Note that there are some explanatory texts on larger screens.

plurals
  1. POBest way to read xml
    primarykey
    data
    text
    <p>What's best way to read XML ?</p> <p>My xml is like that I'll have a lot of </p> <pre><code>&lt;A&gt; and &lt;B&gt;, not sure how many will be there and I have to read the whole xml file. </code></pre> <p>I can not say that the child element like </p> <pre><code>&lt;180&gt; will be there under &lt;A&gt; for sure. So does the other element. </code></pre> <p>But if it's there I have to read it.</p> <p><strong>Should I use LINQ or XPath or XMLReader ?</strong> Which one will be better and easier?</p> <pre><code> &lt;A&gt; &lt;180&gt;20130218&lt;/180&gt; ///180 is here &lt;170&gt;5&lt;/170&gt; &lt;220&gt;20080210&lt;/220&gt; &lt;730 CLID='AAA' KW='BBB' KW2='INTERNATIONAL'&gt; &lt;731&gt;BBB INTERNATIONAL AG&lt;/731&gt; &lt;732&gt;XXX&lt;/732&gt; &lt;735&gt;US66&lt;/735&gt; &lt;734&gt;YYY&lt;/734&gt; &lt;/730&gt; &lt;300&gt; &lt;301&gt; &lt;320&gt;20071100&lt;/320&gt; &lt;310&gt;12345&lt;/310&gt; &lt;/301&gt; &lt;330&gt;US&lt;/330&gt; &lt;/300&gt; &lt;/A&gt; &lt;A&gt; ///180 is not here &lt;170&gt;5&lt;/170&gt; &lt;220&gt;20080210&lt;/220&gt; &lt;730 CLID='AAA' KW='BBB' KW2='WORLD'&gt; &lt;731&gt;BBB INTERNATIONAL AG&lt;/731&gt; &lt;734&gt;YYY&lt;/734&gt; &lt;/730&gt; &lt;300&gt; &lt;301&gt; &lt;320&gt;20071100&lt;/320&gt; &lt;310&gt;12345&lt;/310&gt; &lt;/301&gt; &lt;330&gt;UK&lt;/330&gt; &lt;/300&gt; &lt;/A&gt; &lt;B&gt; &lt;180&gt;20130218&lt;/180&gt; &lt;170&gt;5&lt;/170&gt; &lt;220&gt;20080210&lt;/220&gt; &lt;730 CLID='AAA' KW='BBB' KW2='INTERNATIONAL'&gt; &lt;731&gt;BBB INTERNATIONAL AG&lt;/731&gt; &lt;732&gt;XXX&lt;/732&gt; &lt;733&gt;JP&lt;/733&gt; &lt;735&gt;JP66&lt;/735&gt; &lt;734&gt;YYY&lt;/734&gt; &lt;/730&gt; &lt;300&gt; &lt;301&gt; &lt;320&gt;20071100&lt;/320&gt; &lt;310&gt;12345&lt;/310&gt; &lt;/301&gt; &lt;330&gt;JP&lt;/330&gt; &lt;/300&gt; &lt;/B&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload