Than you very much for helping.
I have one more question please:
=======================================
<?xml version="1.0" encoding="utf-8" ?>
<Languages>
<Language Lnag="English" />
<Captions>
<Name>Some English caption</Name>
</Captions>
<Language>
<Language Lnag="German" />
<Captions>
<Name>Some German caption</Name>
</Captions>
<Language>
</Languages>
=======================================
Can you show me please how can I get "Some English caption"?
Thank you?
"Jesper" <Je****@discussions.microsoft.com> wrote in message
news:2C**********************************@microsof t.com...
Hi David,
using System.Xml
Construct xml document using
XmlDocument doc = new XmlDocument;
Load document
doc.Load(file);
Now adress the text node
XmlNode node =
doc.SelectSingleNode("Language/English/Messages/Name/text()");
then read the value into a string
string foo = node.Value;
Use XPath expressions in the selectSingleNode function!
Regards Jesper,Denmark
"David" wrote:
Hello.
I have XML file like this:
==========================================
<?xml version="1.0" encoding="utf-8" ?>
<Language>
<English>
<Captions>
<Name>Some caption</Name>
</Captions>
<Messages>
<Name>Some message</Name>
</Messages>
</English>
</Language>
==========================================
I want to read from this XML file "Some message" which is on
Language\English\Messages section.
How can I do this?
Can anybody show me some example?
Thank you.