how to creating new node inside a xml node

Discussion in 'ASP General' started by Geagleeye, Aug 2, 2006.

  1. Geagleeye

    Geagleeye Guest

    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
    Geagleeye, Aug 2, 2006
    #1
    1. Advertising

  2. Geagleeye wrote:
    > 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.

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
    Bob Barrows [MVP], Aug 2, 2006
    #2
    1. Advertising

  3. Geagleeye

    Geagleeye Guest

    ok thanks
    Geagleeye, Aug 3, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    1,413
  2. Replies:
    5
    Views:
    737
    Alan Kennedy
    Nov 4, 2005
  3. Tjerk Wolterink
    Replies:
    2
    Views:
    1,404
    Dimitre Novatchev
    Aug 24, 2006
  4. remlostime
    Replies:
    4
    Views:
    347
    Thomas J. Gritzan
    Sep 5, 2008
  5. Martin Honnen

    Re: Reading XML Node-by-Node

    Martin Honnen, Nov 12, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    380
    Martin Honnen
    Nov 12, 2008
Loading...

Share This Page