Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Select and copy parts of a string
#5
Thanks for your reply Smile

I've looked the XML help in QM, but i'm having a problem again :p

For this XML :

Code:
Copy      Help
<XML>
  <Elements nextID="4">
    <Element>
      <ID>1</ID>
      <Date>2015-03-05T14:33:48</Date>
      <Name>File1</Name>
      <Link>Link1</Link>
    </Element>
    <Element>
      <ID>2</ID>
      <Date>2015-03-05T14:33:48</Date>
      <Name>File2</Name>
      <Link>Link2</Link>
    </Element>
    <Element>
      <ID>3</ID>
      <Date>2015-03-05T14:33:48</Date>
      <Name>File3</Name>
      <Link>Link3</Link>
    </Element>
  </Elements>
</XML>

The given code does not work anymore, but i'm sure i have to modify something in

Code:
Copy      Help
IXmlNode n=x.RootElement.Path(F"Element[Name='{file}']/ID")

I tried :
Code:
Copy      Help
IXmlNode n=x.RootElement.Path(F"[XML][Elements]Element[Name='{file}']/ID")
It work, but i can only get the ID of the File1, if str file="File2", the out ID is still 1

How can i Fix this ? Thanks in advance !


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)