how to retrieve records from an XML file 
Author Message
 how to retrieve records from an XML file

Hi,

System.Xml.XmlDocument myXML = new System.Xml.XmlDocument();

myXML.Load(filename);

System.Xml.NodeList Nodes = myXML.GetElementsbyTagName("Quote");

foreach (System.Xml.node node in Nodes)
{
        System.Windows.Messagebox.Show(node.toString());

Quote:
}

Hope this is enough
Byee
Nirosh
Note: May be simple capital error so just ajust them


Quote:
> hi

> I have an xml file like this:
> <dataroot>
>     <record>
>         <Quote>this is some famous quotation</Quote>
>         <Quoter>this is the person who delivered it</Quoter>
>     </record>
>     <record>
>         <Quote>another quote</Quote>
>         <Quoter>the quoter</Quoter>
>     </record>
> ...
> ...
> </dataroot>
> which store a number of quotations within elements 'record' and
> child-elements 'quote' and 'quoter', with the document root as 'dataroot'.
> hope u understood. what is the best way to retreive the record so that i
can
> put these into a string collection? plz tell me the correct sequenece too.
> will i have to use system.xml.nodelist etc?

> thanks
> rakesh rajan



Tue, 21 Jun 2005 12:20:51 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. how to retrieve records from an XML file?

2. VC++ and XML, I want to retrieve an XML file from URL

3. VC++ and XML, I want to retrieve an XML file from a URL

4. Retrieving data from a XML file on the web

5. How to retrive records from an XML file

6. creating xml schema programmatically from an an xml file without using ADO.NET

7. retrieve XML data from SQL server by using XSD mapping schema

8. Retrieving elements from xml documents

9. formula in crystal doesn't work -- all records retrieved

10. catalog sample: retrieving records

11. !Retrieve Records and Dump Into C++ Array

12. Retrieve Records and Dump Into C++ Array

 

 
Powered by phpBB® Forum Software