Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6 NameSpace problem 1

Status
Not open for further replies.

Periko

Programmer
Feb 24, 2003
134
BE
Hello,

My xml looks as follows
<root>
<Points xyz="abc" >
<Point r="123" d="456" />
<point r="321" d="654" />
.......
<point r="999" d="999" />
</Points>
</root>

I'm using the command to find my namespace points and get the attribute xyz and change the attribute of contents :

Set VElem = XmlDoc.selectSingleNode("/ns:root/ns:points")
Call VElem.setAttribute("xyz", "efg")

My problem is, i can look for the "point", but after that I have 30 time an "r". How do I search for each of these "r" to adapt the contents of this ?

Kind regards...
Periko...


 
[tt]set cpoint=VElem.selectNodes("ns:point")
for each opoint in cpoint
'etc... do things
next
[/tt]
ps: mind the (upper/lower) case of point
 
This seems nice, thx, can you only tell me what the declaration is of opoint and cpoint ? IXMLDOMNode ? or IXMLDOMNodeList ?

Periko
 
[tt]dim cpoint as IXMLDOMSelection
dim opoint as IXMLDOMElement[/tt]

I wonder if you notice the trick I mentioned last time. You can always, or most of the time, start with variant and debug.print the typename of the object to discover the type.
 
Thx, I will keep your trick in mind the next time.

I gave you a star for this :)

Periko...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top