xml question with c#

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • daveL

    xml question with c#

    i have xml like below
    <ROOT>
    <ITEM Name="Hello">
    <SomeValue1a </SomeValue1>
    <SomeValue2b </SomeValue2>
    </ITEM>
    <ITEM Name="World">
    <SomeValue1BO B </SomeValue1>
    <SomeValue2CARO L </SomeValue2>
    </ITEM>
    </ROOT>


    How to Selectsinglenod e() to get to the Node ITEM with Name = "World"
    or do i have to Loop and Find it that way

    Thanks
    DaveL





  • =?ISO-8859-1?Q?Arne_Vajh=F8j?=

    #2
    Re: xml question with c#

    daveL wrote:
    i have xml like below
    <ROOT>
    <ITEM Name="Hello">
    <SomeValue1a </SomeValue1>
    <SomeValue2b </SomeValue2>
    </ITEM>
    <ITEM Name="World">
    <SomeValue1BO B </SomeValue1>
    <SomeValue2CARO L </SomeValue2>
    </ITEM>
    </ROOT>
    >
    >
    How to Selectsinglenod e() to get to the Node ITEM with Name = "World"
    or do i have to Loop and Find it that way
    Try:

    doc.SelectSingl eNode("//ROOT/ITEM[@Name='World']")

    Arne

    Comment

    • daveL

      #3
      Re: xml question with c#

      Thanks alot
      DaveL

      "Arne Vajhøj" <arne@vajhoej.d kwrote in message
      news:48b1b334$0 $90265$14726298 @news.sunsite.d k...
      daveL wrote:
      >i have xml like below
      ><ROOT>
      > <ITEM Name="Hello">
      > <SomeValue1a </SomeValue1>
      > <SomeValue2b </SomeValue2>
      > </ITEM>
      ><ITEM Name="World">
      > <SomeValue1BO B </SomeValue1>
      > <SomeValue2CARO L </SomeValue2>
      > </ITEM>
      ></ROOT>
      >>
      >>
      >How to Selectsinglenod e() to get to the Node ITEM with Name = "World"
      >or do i have to Loop and Find it that way
      >
      Try:
      >
      doc.SelectSingl eNode("//ROOT/ITEM[@Name='World']")
      >
      Arne

      Comment

      Working...