Parsing XML file with non-unique tag names using VB



While I have a rudimentary understanding of how to read XML where tag
names themselves are unique, I am unsure how best to navigate XML where
tag names are not unique but instead have unique attribute values
associated with them (<object key="something">). I have reviewed many
XML/DOM resources on the net but it still isn't clear to me whether or
not there exists a way to drill down directly to the level I want or
whether I have to walk the entire tree programmatically. Can someone
please provide me with an example demonstrating the correct approach?

Specifically, I am trying to retrieve menu items for a program (not my
own) that stores the menu configuration in an XML file. The program
stores menu actions as a list of values, each one a pointer to a menu
action definition section. The simplified, stripped-down structure of
the file is shown below:

<?xml version="1.0"?>
<object key="actionsConfiguration" version="3.0">
<array key="topLevelActions">
<value>action1</value>
<value>action2</value>
<value>action3</value>
<value>action4</value>
<value>action5</value>
</array>
<list key="actionDefinitions">
<object key="actionDefinition">
<setting key="id">action1</setting>
<setting key="title">title1</setting>
</object>
<object key="actionDefinition">
<setting key="id">action2</setting>
<setting key="title">title2</setting>
</object>
<object key="actionDefinition">
<setting key="id">action3</setting>
<setting key="title">title3</setting>
</object>
<object key="actionDefinition">
<setting key="id">action4</setting>
<setting key="title">title4</setting>
</object>
<object key="actionDefinition">
<setting key="id">action5</setting>
<setting key="title">title5</setting>
</object>
</list>
</object>

I would like to be able to read this file and present a client with a
list box containing each of the menu actions. By selecting a menu
item, the client could then edit the menu action definition associated
with that particular selection. I also need to be able to add and
delete both menu actions and their associated definitions.

Thanks in advance for any-and-all assistance.

.



Relevant Pages

  • Parsing XML file with non-unique tag names using VB
    ... While I have a rudimentary understanding of how to read XML where tag ... By selecting a menu ... the client could then edit the menu action definition associated ...
    (comp.lang.basic.visual.misc)
  • Re: How can I ensure that I always have a list?
    ... tdom is an XML parsing extension for Tcl. ... # Match one tag. ... # quotes, ... # key/value pair) for further processing the next time we go ...
    (comp.lang.tcl)
  • Re: How can I ensure that I always have a list?
    ... tdom is an XML parsing extension for Tcl. ... # Match one tag. ... # quotes, ... # key/value pair) for further processing the next time we go ...
    (comp.lang.tcl)
  • Re: ruby html (or xhtml) forms class...
    ... xx is a library designed to extend ruby objects with html, xhtml, and xml ... xml or xhtml as clean looking and natural as ruby it self. ... attributes may be passed to any tag method as either symbol or string. ...
    (comp.lang.ruby)
  • Re: Cant read CString after serialization
    ... it was not the time to build steam engines. ... the DTD syntax would be expressed in XML!) ... parse the file and show it (for example, a columnar display of tag id, tag ... We built huge systems using these techniques. ...
    (microsoft.public.vc.mfc)