muquaddim@gmail.com wrote:
Quote:
Hello,
I have a xml file like the following.
>
<?xml version="1.0">
<data>
<idef units="Vin,Vout,E">
<i id="i1">
<sample num="1">
<sampledata value="2;3;7" />
</sample>
<sample num="2">
<sampledata value="8;1;7" />
</sample>
</i>
<i id="i33"<!-- The Id is totally random -->
<sample num="1">
<sampledata value="2;3;7" />
</sample>
<sample num="2">
<sampledata value="6,2,5" />
</sample>
</i>
<s id="s1">
<sample num="1">
<sampledata value="2" unit="k" />
</sample>
<sample num="2">
<sampledata value="8" unit="k" />
</sample>
</s>
<s id="s2"><!-- The Id is totally random -->
<sample num="1">
<sampledata value="7" unit="k" />
</sample>
<sample num="2">
<sampledata value="8" unit="k" />
</sample>
</s>
<e id="Ea">
<sample num="1">
<sampledata value="9" unit="k" />
</sample>
<sample num="2">
<sampledata value="4" unit="k" />
</sample>
</e>
<e id="Eb">
<sample num="1">
<sampledata value="1" unit="k" />
</sample>
<sample num="2">
<sampledata value="8" unit="k" />
</sample>
</e>
</data>
>
Now I want to parse it and make 10 List<from these.
Lists are ,
Ea: 9,4
Eb: 1,8
s1: 2,8
s2: 7,8
i1-Vin: 2,8
i1-Vout:3,1
i1-E:7,7
i33-Vin: 2,6
i33-Vout:3,2
i33-E:7,5
Sorry, I don't see how these "lists" relate to the input XML.
What kind of lists do you want to create? List<int>?
What is Ea or Eb, part of a list, or some kind of variable name for a list?
Well the .NET framework has the low level but fast forwards only
XmlReader API to parse XML. Then it has XPathDocument/XPathNavigator for
XPath 1.0 based reading and navigation. .NET 3.5 also has LINQ to XML.
Quote:
I need something which is faster. Casue the file is way too large
15MB.
Faster than what?
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/