hi iam getting 1kb xml file like this

<Transfer><rec>1</rec><Message>sds</Message><From>testingnet</From></Transfer>




i want to read only between<from> in the xml

the result should result me only testingnet

i have searched a lot of stuff, i could not find out the easy way to read in windows, vb.net
any body help me, to find the result in between the tags.

Re: reading a xml file by Uri

Uri
Wed Jul 14 07:03:38 CDT 2004

if it's 1K why not load it all and be done with it? (use XPath to access
From)

if, however, we're talking about big files, I think this could help:
http://workspaces.gotdotnet.com/xpathreader

rt wrote:

> hi iam getting 1kb xml file like this
>
> <Transfer><rec>1</rec><Message>sds</Message><From>testingnet</From></Transfer>
>
>
>
>
> i want to read only between<from> in the xml
>
> the result should result me only testingnet
>
> i have searched a lot of stuff, i could not find out the easy way to read in windows, vb.net
> any body help me, to find the result in between the tags.
>
>
>

RE: reading a xml file by rajamanickam

rajamanickam
Wed Jul 14 06:11:02 CDT 2004

Hi ,

you can use GetElementsByTagName method in xml Dom object ...


I saved your xml content like demo.xml

<?xml version="1.0" ?>
<Transfer>
<rec>1</rec>
<Message>sds</Message>
<From>testingnet</From>
</Transfer>



and i wrote code in c# like


System.Xml.XmlDocument obj= new System.Xml.XmlDocument();
obj.Load("c:\\demo.xml");
MessageBox.Show( obj.GetElementsByTagName("From").Item(0).InnerText);



bye

rajamanickam



"rt" wrote:

> hi iam getting 1kb xml file like this
>
> <Transfer><rec>1</rec><Message>sds</Message><From>testingnet</From></Transfer>
>
>
>
>
> i want to read only between<from> in the xml
>
> the result should result me only testingnet
>
> i have searched a lot of stuff, i could not find out the easy way to read in windows, vb.net
> any body help me, to find the result in between the tags.
>
>
>