Xml question

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

    Xml question

    Hello!

    How do I best check if an Xml node is complete in itself.
    I mean if there is an / in the xml node itself.
    For example
    <parameter id="1234567" type="pa-00920-gmhwi" disabled="false "/>
    This xml node is complete in itseld because there is an / at the end.

    //Tony
  • Marc Gravell

    #2
    Re: Xml question

    When using XmlReader, this is the IsEmptyElement property.

    With DOMs it might be harder to identify...

    Marc

    Comment

    • Martin Honnen

      #3
      Re: Xml question

      Tony Johansson wrote:
      How do I best check if an Xml node is complete in itself.
      I mean if there is an / in the xml node itself.
      For example
      <parameter id="1234567" type="pa-00920-gmhwi" disabled="false "/>
      This xml node is complete in itseld because there is an / at the end.
      How about
      <foo></foo>
      that is an empty element as well. Is that different in your opinion to
      <foo/>
      or
      <foo />
      ?

      Check whether reading out the

      gives you the information/distinction you are looking for, your
      description is not clear enough to me to judge whether that property helps.

      LINQ to XML has a similar property




      --

      Martin Honnen --- MVP XML

      Comment

      Working...