Re: XmlTextReader with an XPath
"Mcmullan, Andy (Andrew)" <[email protected]> Fri, 21 Jun 2002 11:02:38 +0100
| Newsgroups | gmane.comp.windows.devel.dotnet.general |
|---|---|
| Message-ID | <04F1AD0C66548E4FABBB8C0717B7AD89CD8877@mercury.stockley.avaya.com> |
Hi Nischal
If you don't mind the performance hit of using XPath, you can write code like this:
XPathDocument xpDoc = new XPathDocument( "customer.xml" );
XPathNavigator xpNav = xpDoc.CreateNavigator();
XPathNodeIterator nodeIt = xpNav.Select( "//currAddress/street/text()" );
string strStreet = "";
if( nodeIt.MoveNext() )
strStreet = nodeIt.Current.Value;
Andy Mc
-----Original Message-----
From: Nischal Muthana [mailto:[email protected]]
Sent: 21 June 2002 00:34
To: [email protected]
Subject: [DOTNET] XmlTextReader with an XPath
Hi All
I have a small program which uses XmlTextReader to
read through an XML file and get the appropriate
values from the file.
<snip>
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.