XmlGrid Users Forum
2012-04-17 09:34:49
I want to create a new element and insert it to an existing XML element.
Here is my sample XML code:
The existing element:
__code__
<custorders>
   <order id="1001"></order>
</custorders>
__code__

I want to add another element to it, so that the new code will be:

__code__
<custorders>
   <order id="1001"></order>
   <order id="1002"></order>
</custorders>
__code__
Please let me know if you have any ideas...

Thanks. 
;3393;2012-04-17 09:34:49__s__
I want to create a new element and insert it to an existing XML element.
Here is my sample XML code:
The existing element:
__code__
<custorders>
   <order id="1001"></order>
</custorders>
__code__

I want to add another element to it, so that the new code will be:

__code__
<custorders>
   <order id="1001"></order>
   <order id="1002"></order>
</custorders>
__code__
Please let me know if you have any ideas...

Thanks. 
__s__~u=xml user~site=NULL__s__How to add new elements to an XML document in javascript?__s____m__

Best view with Google Chrome