Ask a Question related to Macromedia Flash Data Integration, Design and Development.

  1. #1

    Default Inserting XML nodes

    I want to insert a new XML node in my XML object, but not at the end as
    ..appendchild() method does, but in the node position of my choice...

    for instance, I want to place my newly created XML node between nodes 57 and
    58 of my existent XML object.

    How can I do it? .insertBefore() method does not work to me for secondary
    nodes.

    For example, let's say I got this:

    <agenda>
    <entry>John</entry>
    <entry>Mary</entry>
    </agenda>

    I want to insert the node "<entry>Michael</entry>" in between of John and
    Mary... wich would be the right way to do it?

    Thanks !

    ILB


    I.L.B. Guest

  2. Similar Questions and Discussions

    1. Accessing XML nodes
      Suppose this your XML: <content> <author> <book> <title>this is the title</title> <description>book description</description> <book>...
    2. Check for missing xml nodes or empty nodes
      Hi, Is it possible to check for missing or empty xml nodes "before" putting them into a table or doing a XMLSearch . Sometimes the xml will come...
    3. Interactive nodes.
      Hey, ive been to bit-101.com, and i really like the nodes and things it has on there. I got the tutorial on how i make a simple on of his type, but...
    4. Creating nodes with ASP
      I have a page that lists categories on the left, and I'd like to be able to click on one, and have a node pop out, revealing subcategories so users...
    5. referencing XML nodes by name
      I would like to access the info in an XML file by name but Macromedias XML-Xtra instructions only explain how to access data via child-number eg...
  3. #2

    Default Re: Inserting XML nodes

    Well for anybody could be interested in this, I found something that works:

    xml.childNodes[n].appendChild(xmlnode);

    This way I can decide where to insert my new node, if previously defined as
    a new XML object.

    Cheers,

    Ig.



    "I.L.B." <suricata_2@hotmail.com> escribió en el mensaje
    news:d7k2md$c39$1@forums.macromedia.com...
    > I want to insert a new XML node in my XML object, but not at the end as
    > .appendchild() method does, but in the node position of my choice...
    >
    > for instance, I want to place my newly created XML node between nodes 57
    and
    > 58 of my existent XML object.
    >
    > How can I do it? .insertBefore() method does not work to me for secondary
    > nodes.
    >
    > For example, let's say I got this:
    >
    > <agenda>
    > <entry>John</entry>
    > <entry>Mary</entry>
    > </agenda>
    >
    > I want to insert the node "<entry>Michael</entry>" in between of John and
    > Mary... wich would be the right way to do it?
    >
    > Thanks !
    >
    > ILB
    >
    >

    I.L.B. Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139