Note that there are some explanatory texts on larger screens.

plurals
  1. POstore xml in object
    primarykey
    data
    text
    <p>say, i have such xml file:</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;catalog&gt; &lt;title&gt;My book catalog&lt;/title&gt; &lt;link&gt;http://example.com/catalog&lt;/link&gt; &lt;book id="bk101"&gt; &lt;author&gt;Gambardella, Matthew&lt;/author&gt; &lt;title&gt;XML Developer's Guide&lt;/title&gt; &lt;genre&gt;Computer&lt;/genre&gt; &lt;price&gt;44.95&lt;/price&gt; &lt;publish_date&gt;2000-10-01&lt;/publish_date&gt; &lt;description&gt;An in-depth look at creating applications with XML.&lt;/description&gt; &lt;/book&gt; &lt;book id="bk102"&gt; &lt;author&gt;Ralls, Kim&lt;/author&gt; &lt;title&gt;Midnight Rain&lt;/title&gt; &lt;genre&gt;Fantasy&lt;/genre&gt; &lt;price&gt;5.95&lt;/price&gt; &lt;publish_date&gt;2000-12-16&lt;/publish_date&gt; &lt;description&gt;A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.&lt;/description&gt; &lt;/book&gt; &lt;/catalog&gt; </code></pre> <p>in the end it's needed to get object, which i can use as follows:</p> <pre><code>xml.title //must return "My book catalog" xml.link //must return "http://example.com/catalog" xml.book[0] //is an object with following properties: //author, title, genre etc... //i.e., xml.book[0].author must return Gambardella, Matthew </code></pre> <p>hope that there was no similar question and sorry if there any, my bad, that i didn't found. also, if there any documentation for this, particular case, please point to it, because i just couldn't find it. there was plenty of documentation about xml parsing in various ways, but no info on this case.</p> <p>thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    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