PDA

View Full Version : Working just on part of a xml file



SpinoWeb
10 Mar 2011, 1:55 AM
My xml file is:

<?xml version="1.0" encoding="UTF-8"?>
<cewt>

<project>
<version>1.0.0</version>
<saved>04 Mar. 2011</saved>
<author>SpinoWeb</author>
</project>

<materials>
<concretes>
<cls>
<name>C20/25</name>
<law>5</law>
<fc0>11.40</fc0>
<ec0>2.000</ec0>
<fcu>11.40</fcu>
<ecu>3.500</ecu>
</cls>
<cls>
<name>C25/30</name>
<law>5</law>
<fc0>14.20</fc0>
<ec0>2.000</ec0>
<fcu>14.20</fcu>
<ecu>3.500</ecu>
</cls>
</concretes>
<steels>
<steel>
<name>B450C</name>
<law>1</law>
<fyk>391.30</fyk>
<eyk>2.000</eyk>
<fsu>391.30</fsu>
<esu>65.000</esu>
</steel>
</steels>
<tendons>
<tendon>
<name>tendon_1</name>
<law>1</law>
<fyk>347.80</fyk>
<eyk>2.000</eyk>
<fsu>347.80</fsu>
<esu>65.000</esu>
</tendon>
</tendons>
</materials>

<sections>
<sec>
<bh>
<type>R</type>
<bw>300.0</bw>
<h>600.0</h>
<Bt>600.0</Bt>
<Bb>500.0</Bb>
<St>100.0</St>
<Sb>100.0</Sb>
</bh>
<coord>
<xy><x>0.0</x><y>0.0</y></xy>
<xy><x>300.0</x><y>0.0</y></xy>
<xy><x>300.0</x><y>600.0</y></xy>
<xy><x>0.0</x><y>600.0</y></xy>
</coord>
<rebar>
<rb><x>40.0</x><y>40.0</y><Ar>314.0</Ar></rb>
<rb><x>260.0</x><y>40.0</y><Ar>314.0</Ar></rb>
<rb><x>40.0</x><y>560.0</y><Ar>254.0</Ar></rb>
<rb><x>260.0</x><y>560.0</y><Ar>254.0</Ar></rb>
</rebar>
</sec>
</sections>

</cewt>For example, I'd want to build a grid just with the content between <concretes> tags with <cls> as rows. I need several actions on the grid: add, remove, delete, and edit.
It is the input file of my apply and I cannot trim it in different files. How can I work only on any parts of xml file?

Thank you.