#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    22
    Rep Power
    0

    Question vbscript -->javascript thanks


    hi
    <script type="text/vbscript">

    set xmlDoc=CreateObject("Microsoft.XMLDOM")
    xmlDoc.async="false"
    xmlDoc.load("add.xml")

    document.write("The original XML:")
    document.write("<xmp>" & xmlDoc.xml & "</xmp>")

    set newnode=xmldoc.createElement("cancel")
    set newtext=xmldoc.createTextNode("I must cancel")
    newnode.appendChild(newtext)
    xmldoc.documentElement.appendChild(newnode)

    document.write("After appending the new node:")
    document.write("<xmp>" & xmlDoc.xml & "</xmp>")

    </script>
    --------------------------------------
    after running the program, i open the add.xml.
    add.xml:
    <?xml version="1.0"?>
    <note time="12:03:46">
    <to>Tove</to>
    <from>Jani</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>
    </note>
    no cancel nodename in the add.xml, plz any suggestion of adding record into add.xml.
    thanks for help~
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    22
    Rep Power
    0

    post wrong subject


    sorry

IMN logo majestic logo threadwatch logo seochat tools logo