How to read a specific record in XML?
You can use an XPath expression.
Say you have something like this:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<lang>
<En>
<item1>Index</item1>
<item2>Information</item2>
<item5>Contact</item5>
<item6>Search</item6>
</En>
<Se>
<item1>Start</item1>
<item2>Information</item2>
<item5>Kontakt</item5>
<item6>Sök</item6>
</Se>
</lang>
For example you want to read only En or Se record:
To read En record: you can give path as: /lang/En
To read Se record: you can give path as: /lang/Se
Back to
XML FAQ