Hai everybody,
This is a sample XML file I am using.
<?xml version="1.0" encoding="utf-8"?>
<TC_CONFIG>
<Comm name="Ethernet">
<rxPort>3000</rxPort>
</Comm>
<Timeout value="2000">
<units>ms</units>
</Timeout>
<LRM Name="OsamcMainProcCard">
<Addr>1</Addr>
<endian>big</endian>
<ipAddress>192.168.0.41</ipAddress>
<txPort>4000</txPort>
<No_of_Datasets>62</No_of_Datasets>
<BitPacking>LT2RT</BitPacking>
<Dataset dataName="Lrm Description">
<index>0</index>
<writeable>0</writeable>
<no_of_elements>2</no_of_elements>
<Element elementName="Lrm Name">
<type>string</type>
<size>20</size>
<unit></unit>
<note>Name of the Lrm</note>
</Element>
<Element elementName="Lrm Software Version">
<type>string</type>
<size>10</size>
<unit></unit>
<note>Software Version</note>
</Element>
</Dataset> ...
I will get the name of element,say,Lrm Software Version as input from another application. Now, I need to link the LRM and Dataset name of this element so that I can return them.
How do I achieve this ? Is XML parsing only sufficient or tree search is required ?
Can anybody guide me through this.
Thanking All, Rejina.