помогите в разборе вот такого xml schema. общая структура файла такая
1.
2.
3.
4.
5.
6.
7.
8.
<?xml version="1.0" encoding="UTF-8"?>
-<modelExtract xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<header>
+<selection key="22001">
+<tables>
+<parts>
+<DerivedDocuments>
+</modelExtract>
тег parts выглядит так:
-
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
203.
204.
205.
206.
207.
208.
209.
210.
211.
212.
213.
214.
215.
216.
217.
218.
219.
220.
221.
222.
223.
224.
225.
226.
227.
228.
229.
230.
231.
232.
233.
234.
235.
236.
237.
238.
239.
240.
241.
242.
243.
244.
245.
246.
247.
248.
249.
250.
251.
252.
253.
254.
255.
256.
257.
258.
259.
260.
261.
262.
263.
264.
265.
266.
267.
268.
269.
270.
271.
272.
273.
274.
275.
276.
277.
278.
279.
280.
281.
282.
283.
284.
285.
286.
287.
288.
289.
290.
291.
292.
293.
294.
295.
296.
297.
298.
299.
300.
301.
302.
303.
304.
305.
306.
307.
308.
<assembly name="B66">
<mainpart id="294EB" num="B66" quantity="3">
<explicitQuantity>3</explicitQuantity>
<proxy id="1F141" ACADID="192A5" basepart="255E6">
<assemblyWeight>437844.46</assemblyWeight>
<assemblyExactWeight>437844.46</assemblyExactWeight>
<collisionSize x="0.000" y="0.000" z="0.000"/>
<singlepart id="29407" num="1087" ncFile="(1087).nc" quantity="1">
<explicitQuantity>1</explicitQuantity>
<part id="255E6" name="I30Ш2" class="Beam" ACADID="162D1" dstvName="I30Ш2">
<explicitQuantity>1</explicitQuantity>
<role key="АПС_Балка"/>
<length>5089.999</length>
<paintArea>6897427.105</paintArea>
<material key="C345-3" name="С345-3"/>
<coating key="grundiert" name="Грунтовка"/>
<weight>349173.93</weight>
<exactWeight>349173.93</exactWeight>
<weightPerMeter>68600.00</weightPerMeter>
<section key="RUS_ISAC20-93#@§@#I30W2" name="I30Ш2"/>
<sysLength>5100.000</sysLength>
<sawLength>5089.999</sawLength>
<angleX1>0.0000</angleX1>
<angleY1>0.0000</angleY1>
<angleX2>0.0000</angleX2>
<angleY2>0.0000</angleY2>
<SawCutInfo>0</SawCutInfo>
<ElementID>5586</ElementID>
<ElementID>5570</ElementID>
<ElementID>5548</ElementID>
</part>
</singlepart>
<singlepart id="29482" num="1210" ncFile="t16 (1210).nc" quantity="1">
<explicitQuantity>1</explicitQuantity>
<part id="255D5" name="t 16x230x480" class="Plate" ACADID="162D3" dstvName="t 16">
<explicitQuantity>1</explicitQuantity>
<role key="Horizontal_Beam" name="Балка"/>
<length>480.000</length>
<paintArea>243519.008</paintArea>
<numHoles>2</numHoles>
<material key="C345-3" name="С345-3"/>
<coating key="grundiert" name="Грунтовка"/>
<weight>13866.18</weight>
<exactWeight>13746.09</exactWeight>
<thickness>16.000</thickness>
<width>229.999</width>
<area1>110399.520</area1>
<area2>110399.520</area2>
<contourLength>1419.998</contourLength>
<ElementID>5550</ElementID>
<ElementID>5572</ElementID>
<ElementID>5588</ElementID>
</part>
</singlepart>
<singlepart id="29481" num="1209" ncFile="t16 (1209).nc" quantity="1">
<explicitQuantity>1</explicitQuantity>
<part id="255BF" name="t 16x180x440" class="Plate" ACADID="162D6" dstvName="t 16">
<explicitQuantity>1</explicitQuantity>
<role key="Horizontal_Beam" name="Балка"/>
<length>440.000</length>
<paintArea>178240.000</paintArea>
<numHoles>2</numHoles>
<material key="C345-3" name="С345-3"/>
<coating key="grundiert" name="Грунтовка"/>
<weight>9947.52</weight>
<exactWeight>9670.67</exactWeight>
<thickness>16.000</thickness>
<width>180.000</width>
<area1>79200.000</area1>
<area2>79200.000</area2>
<contourLength>1240.000</contourLength>
<ElementID>5590</ElementID>
<ElementID>5552</ElementID>
<ElementID>5574</ElementID>
</part>
</singlepart>
<singlepart id="29432" num="1130" ncFile="(1130).nc" quantity="4">
<explicitQuantity>4</explicitQuantity>
<part id="255B0" name="t 8x216x296" class="Plate" ACADID="162B9" dstvName="t 8">
<explicitQuantity>1</explicitQuantity>
<role key="Horizontal_Beam" name="Балка"/>
<length>296.000</length>
<paintArea>135760.000</paintArea>
<material key="C345-3" name="С345-3"/>
<coating key="grundiert" name="Грунтовка"/>
<weight>4005.89</weight>
<exactWeight>3768.59</exactWeight>
<thickness>8.000</thickness>
<width>215.500</width>
<area1>63788.000</area1>
<area2>63788.000</area2>
<contourLength>1023.000</contourLength>
<ElementID>6232</ElementID>
<ElementID>5461</ElementID>
<ElementID>5563</ElementID>
<ElementID>5579</ElementID>
<ElementID>5581</ElementID>
<ElementID>5559</ElementID>
<ElementID>5565</ElementID>
<ElementID>5460</ElementID>
<ElementID>5578</ElementID>
<ElementID>5562</ElementID>
<ElementID>5457</ElementID>
<ElementID>5575</ElementID>
</part>
<equalpart id="2559F" name="t 8x216x296" ACADID="162BD">
<explicitQuantity>1</explicitQuantity>
</equalpart>
<equalpart id="25594" name="t 8x216x296" ACADID="162C2">
<explicitQuantity>1</explicitQuantity>
</equalpart>
<equalpart id="25586" name="t 8x216x296" ACADID="162BE">
<explicitQuantity>1</explicitQuantity>
</equalpart>
</singlepart>
<singlepart id="29453" num="1163" ncFile="(1163).nc" quantity="1">
<explicitQuantity>1</explicitQuantity>
<part id="255A7" name="t 16x360x440" class="Plate" ACADID="162BB" dstvName="t 16">
<explicitQuantity>1</explicitQuantity>
<role key="Horizontal_Beam" name="Балка"/>
<length>440.000</length>
<paintArea>342400.000</paintArea>
<numHoles>4</numHoles>
<material key="C345-3" name="С345-3"/>
<coating key="grundiert" name="Грунтовка"/>
<weight>19895.04</weight>
<exactWeight>19341.33</exactWeight>
<thickness>16.000</thickness>
<width>360.000</width>
<area1>158400.000</area1>
<area2>158400.000</area2>
<contourLength>1600.000</contourLength>
<ElementID>5458</ElementID>
<ElementID>5560</ElementID>
<ElementID>5576</ElementID>
</part>
</singlepart>
<singlepart id="29449" num="1153" ncFile="(1153).nc" quantity="1">
<explicitQuantity>1</explicitQuantity>
<part id="255A2" name="t 16x480x480" class="Plate" ACADID="162BC" dstvName="t 16">
<explicitQuantity>1</explicitQuantity>
<role key="Horizontal_Beam" name="Балка"/>
<length>480.000</length>
<paintArea>491520.000</paintArea>
<numHoles>4</numHoles>
<material key="C345-3" name="С345-3"/>
<coating key="grundiert" name="Грунтовка"/>
<weight>28938.24</weight>
<exactWeight>28698.05</exactWeight>
<thickness>16.000</thickness>
<width>480.000</width>
<area1>230400.000</area1>
<area2>230400.000</area2>
<contourLength>1920.000</contourLength>
<ElementID>5577</ElementID>
<ElementID>5459</ElementID>
<ElementID>5561</ElementID>
</part>
</singlepart>
</proxy>
<equalpart id="1F142" ACADID="192A6" explicitQuantity="1">
<assemblyWeight>437844.46</assemblyWeight>
<assemblyExactWeight>437844.46</assemblyExactWeight>
</equalpart>
<equalpart id="1F143" ACADID="192A7" explicitQuantity="1">
<assemblyWeight>437844.46</assemblyWeight>
<assemblyExactWeight>437844.46</assemblyExactWeight>
</equalpart>
<boltPatternOnSite id="21F56" num="1274" name="M20 x 90 7798-70 8.8 - Нет - 2Na2W" class="BoltPattern" ACADID="14B0E" setkey="2" nameBolt="Болт М20 - 6gx90.88 ГОСТ 7798-70" setBoltsType="1">
<explicitQuantity>1</explicitQuantity>
<set key="2Na2W" name="2Na2W"/>
<numBolts>1</numBolts>
<standard key="7798-70" name="7798-70"/>
<diameter>20.000</diameter>
<material key="8.8" name="8.8"/>
<boltLength>90.000</boltLength>
<fitLength>39.500</fitLength>
<fitLengthIncrement>0.000</fitLengthIncrement>
<holeTolerance>6.000</holeTolerance>
<mountLocation>0</mountLocation>
<firstConnObjId>1F141</firstConnObjId>
<AllConnObjIds>1F141,259EE</AllConnObjIds>
<equalPart id="225A9" name="M20 x 90 7798-70 8.8 - Нет - 2Na2W" ACADID="151C9">
<explicitQuantity>1</explicitQuantity>
<AllConnObjIds>1F142,2599D</AllConnObjIds>
</equalPart>
<equalPart id="26E2F" name="M20 x 90 7798-70 8.8 - Нет - 2Na2W" ACADID="15E46">
<explicitQuantity>1</explicitQuantity>
<AllConnObjIds>259EE,259EF,1F143</AllConnObjIds>
</equalPart>
</boltPatternOnSite>
<boltPatternOnSite id="21F55" num="1274" name="M20 x 90 7798-70 8.8 - Нет - 2Na2W" class="BoltPattern" ACADID="14B0F" setkey="2" nameBolt="Болт М20 - 6gx90.88 ГОСТ 7798-70" setBoltsType="1">
<explicitQuantity>1</explicitQuantity>
<set key="2Na2W" name="2Na2W"/>
<numBolts>1</numBolts>
<standard key="7798-70" name="7798-70"/>
<diameter>20.000</diameter>
<material key="8.8" name="8.8"/>
<boltLength>90.000</boltLength>
<fitLength>39.500</fitLength>
<fitLengthIncrement>0.000</fitLengthIncrement>
<holeTolerance>6.000</holeTolerance>
<mountLocation>0</mountLocation>
<firstConnObjId>1F141</firstConnObjId>
<AllConnObjIds>1F141,2599D</AllConnObjIds>
<equalPart id="225A8" name="M20 x 90 7798-70 8.8 - Нет - 2Na2W" ACADID="151C8">
<explicitQuantity>1</explicitQuantity>
<AllConnObjIds>1F142,259A0</AllConnObjIds>
</equalPart>
<equalPart id="26E2E" name="M20 x 90 7798-70 8.8 - Нет - 2Na2W" ACADID="15E45">
<explicitQuantity>1</explicitQuantity>
<AllConnObjIds>259EE,259EF,1F143</AllConnObjIds>
</equalPart>
</boltPatternOnSite>
<boltPatternOnSite id="21F57" num="1274" name="M20 x 90 7798-70 8.8 - Нет - 2Na2W" class="BoltPattern" ACADID="14B0D" setkey="2" nameBolt="Болт М20 - 6gx90.88 ГОСТ 7798-70" setBoltsType="1">
<explicitQuantity>1</explicitQuantity>
<set key="2Na2W" name="2Na2W"/>
<numBolts>1</numBolts>
<standard key="7798-70" name="7798-70"/>
<diameter>20.000</diameter>
<material key="8.8" name="8.8"/>
<boltLength>90.000</boltLength>
<fitLength>39.500</fitLength>
<fitLengthIncrement>0.000</fitLengthIncrement>
<holeTolerance>6.000</holeTolerance>
<mountLocation>0</mountLocation>
<firstConnObjId>1F141</firstConnObjId>
<AllConnObjIds>1F141,2599D</AllConnObjIds>
<equalPart id="225AA" name="M20 x 90 7798-70 8.8 - Нет - 2Na2W" ACADID="151CA">
<explicitQuantity>1</explicitQuantity>
<AllConnObjIds>1F142,259A0</AllConnObjIds>
</equalPart>
<equalPart id="26E2D" name="M20 x 90 7798-70 8.8 - Нет - 2Na2W" ACADID="15E44">
<explicitQuantity>1</explicitQuantity>
<AllConnObjIds>259EE,259EF,1F143</AllConnObjIds>
</equalPart>
</boltPatternOnSite>
<boltPatternOnSite id="21F4E" num="1274" name="M20 x 90 7798-70 8.8 - Нет - 2Na2W" class="BoltPattern" ACADID="14B12" setkey="2" nameBolt="Болт М20 - 6gx90.88 ГОСТ 7798-70" setBoltsType="1">
<explicitQuantity>1</explicitQuantity>
<set key="2Na2W" name="2Na2W"/>
<numBolts>1</numBolts>
<standard key="7798-70" name="7798-70"/>
<diameter>20.000</diameter>
<material key="8.8" name="8.8"/>
<boltLength>90.000</boltLength>
<fitLength>39.500</fitLength>
<fitLengthIncrement>0.000</fitLengthIncrement>
<holeTolerance>6.000</holeTolerance>
<mountLocation>0</mountLocation>
<firstConnObjId>1F141</firstConnObjId>
<AllConnObjIds>1F141,259ED</AllConnObjIds>
<equalPart id="225B1" name="M20 x 90 7798-70 8.8 - Нет - 2Na2W" ACADID="151CD">
<explicitQuantity>1</explicitQuantity>
<AllConnObjIds>1F142,1D956</AllConnObjIds>
</equalPart>
<equalPart id="26E1F" name="M20 x 90 7798-70 8.8 - Нет - 2Na2W" ACADID="15E42">
<explicitQuantity>1</explicitQuantity>
<AllConnObjIds>1F143,259F0</AllConnObjIds>
</equalPart>
</boltPatternOnSite>
<boltPatternOnSite id="21F4D" num="1274" name="M20 x 90 7798-70 8.8 - Нет - 2Na2W" class="BoltPattern" ACADID="14B13" setkey="2" nameBolt="Болт М20 - 6gx90.88 ГОСТ 7798-70" setBoltsType="1">
<explicitQuantity>1</explicitQuantity>
<set key="2Na2W" name="2Na2W"/>
<numBolts>1</numBolts>
<standard key="7798-70" name="7798-70"/>
<diameter>20.000</diameter>
<material key="8.8" name="8.8"/>
<boltLength>90.000</boltLength>
<fitLength>39.500</fitLength>
<fitLengthIncrement>0.000</fitLengthIncrement>
<holeTolerance>6.000</holeTolerance>
<mountLocation>0</mountLocation>
<firstConnObjId>1F141</firstConnObjId>
<AllConnObjIds>1F141,1D956</AllConnObjIds>
<equalPart id="225B2" name="M20 x 90 7798-70 8.8 - Нет - 2Na2W" ACADID="151CE">
<explicitQuantity>1</explicitQuantity>
<AllConnObjIds>1F142,2599F</AllConnObjIds>
</equalPart>
<equalPart id="26E20" name="M20 x 90 7798-70 8.8 - Нет - 2Na2W" ACADID="15E43">
<explicitQuantity>1</explicitQuantity>
<AllConnObjIds>1F143,259ED</AllConnObjIds>
</equalPart>
</boltPatternOnSite>
<boltPatternOnSite id="21F58" num="1274" name="M20 x 90 7798-70 8.8 - Нет - 2Na2W" class="BoltPattern" ACADID="14B0C" setkey="2" nameBolt="Болт М20 - 6gx90.88 ГОСТ 7798-70" setBoltsType="1">
<explicitQuantity>1</explicitQuantity>
<set key="2Na2W" name="2Na2W"/>
<numBolts>1</numBolts>
<standard key="7798-70" name="7798-70"/>
<diameter>20.000</diameter>
<material key="8.8" name="8.8"/>
<boltLength>90.000</boltLength>
<fitLength>39.500</fitLength>
<fitLengthIncrement>0.000</fitLengthIncrement>
<holeTolerance>6.000</holeTolerance>
<mountLocation>0</mountLocation>
<firstConnObjId>1F141</firstConnObjId>
<AllConnObjIds>1F141,259EE</AllConnObjIds>
<equalPart id="225A7" name="M20 x 90 7798-70 8.8 - Нет - 2Na2W" ACADID="151C7">
<explicitQuantity>1</explicitQuantity>
<AllConnObjIds>1F142,2599D</AllConnObjIds>
</equalPart>
<equalPart id="26E30" name="M20 x 90 7798-70 8.8 - Нет - 2Na2W" ACADID="15E47">
<explicitQuantity>1</explicitQuantity>
<AllConnObjIds>259EE,259EF,1F143</AllConnObjIds>
</equalPart>
</boltPatternOnSite>
</mainpart>
</assembly>
мне нужно отсюда вытащить разные данные, вроде assemblyWeight, singlepart id и т.д. со всем разобрался, одна проблема - как если выбирать, к примеру singlepart получить значение только первого элемента (или n-го) и как подсчитать количество singlepart внутри каждого узла assembly? наверное, ответ лежит на поверхности, но додуматься сам не могу.спасибо отозвавшимся