XML, where do I start?

T

ThunderMusic

Hi,
I'm doing a custom web control. In this web control, I must load an xml file
and parse it to get all the items to add to the control. I will be a menu
bar, so I will have to find all the menubar items and their children, et al.
For the rendering logic, I have no problem, the problem appears when it
comes to parse the xml... I absolutely don't know where to start. I never
worked with XML files before.

Is there a place where parsing an xml file is detailed as if I were a 3
years old boy? lol ;) or can somebody give me a hint please on how to do
it?

My XML looks like this :

<XMLMenuBar bgcolor="#000000" Orientation=0>
<XMLMenuBarItem Name="MBIHome" Text="Home" URL="./home.aspx" Width="75"
/>
<XMLMenuBarItem Name="MBIAboutUs" Text="About Us" URL="./aboutus.aspx"
Width="80">
<XMLMenuBarItem Name="MBIAboutUsHistory" Text="Our History"
URL="./ourhistory.aspx" />
<XMLMenuBarItem Name="MBIAboutUsGoal" Text="Our Goal"
URL="./ourgoal.aspx" />
</XMLMenuBarItem>
<XMLMenuBarItem Name="MBIServices" Text="Services"
URL="./services.aspx">
<XMLMenuBarItem Name="MBIServices_InrastMon" Text="Internet Radio
Monitoring" URL="./services.aspx?service=1" />
</XMLMenuBarItem>
........... and so on........
</XMLMenuBar>

So the structure is simple. Now, I think I must use an XmlDocument object to
load the file and parse it, but how can I do that? XMLMenuBar is my
container class and XMLMenuBarItem is a nested class within XMLMenuBar
(maybe it is important to specify, as I am totally new to all this).

Thanks
 
T

ThunderMusic

excellent idea... I didn't think they had done this book... I've seen many
"for dummies" book, but never seen "Xml for dummies" at my local store...
thanks for the link.
 

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

Top