XML - query

R

Rahul Sane

Hi,

I need to have a small, easy and portable database and i'm thinking of
having a simple XML file (without using DTD, etc).
Can you please let me know, as to how I can read/write into different
attributes.
I've given a example XML below and I need to know as to how exactly I can
loop and display all the "Title" attributes
seperately (i.e. description and URL).

<?xml version="1.0" encoding="utf-8" ?>
<Titles>
<Title Description="Hotmail" URL="http://hotmail.com>
<Title Description="Microsoft" URL="http://microsoft.com>
<Title Description="Windows" URL="http://windows.com>
</Titles>


Thanks in advance,
Rahul Sane.
 
G

Guest

If you go with your own XML format, you will have to loop through the
document nodes yourself. It is easy enough to parse through the nodes and
their attributes and even search, using XPath. I envision you needing more
metadata unless this is going to stay extremely small.

You might consider setting up the XML as a DataSet so you can take advantage
of the ADO.NET model.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top