how to creating new node inside a xml node

G

Geagleeye

Hi...

how do i create a new xmlnode inside a node ...
i have folowing code :

Dim tmpElement As MSXML2.IXMLDOMElement
Dim nlItems As MSXML2.IXMLDOMNodeList
Dim tmpNode As MSXML2.IXMLDOMNode


Set nlItems = axResponse.responseXML.selectNodes("//item/data")
For Each tmpNode In nlItems
Set tmpElement = tmpNode

'is it possible to wrtite som thing here to create a new node ?



Next
 
B

Bob Barrows [MVP]

Geagleeye said:
Hi...

how do i create a new xmlnode inside a node ...
i have folowing code :

Dim tmpElement As MSXML2.IXMLDOMElement
Dim nlItems As MSXML2.IXMLDOMNodeList
Dim tmpNode As MSXML2.IXMLDOMNode

It appears that you are posting in the wrong place. This is VB code, not
vbscript which does not support the "As ... " modifier in Dim
statements. VB cannot be used in ASP pages. In the future you will get
more focussed assistance by posting to a Visual Basic group such as
microsoft.public.vb.general.discussion
Set nlItems = axResponse.responseXML.selectNodes("//item/data")
For Each tmpNode In nlItems
Set tmpElement = tmpNode

'is it possible to wrtite som thing here to create a new node ?
Where do you wish to create it? In VB, you would create a new node by:

Set tmpNode = New MSXML2.IXMLDOMNode

If you were dealing with a domdocument, you could use the domdocument's
CreateElement method and then use the AppendChild method to add your
node to the document.
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,905
Latest member
Kristy_Poole

Latest Threads

Top