|
| |
User Groups : Forums : SiteExperts :
XML Technologies
:  | How to create child nodes of multiple parents of same name I'm using the MS XML object model via Seth Juarez's XML class (http://xmlfiles.com/articles/seth/xmldatatransfer/default.asp), to create an ASX playlist but the principle will apply anywhere.
Here's the struture I want (obviously the brackets has been changed so that the code is viewable here):
{ASX version = "3.0"} {PARAM NAME = "Encoding" VALUE = "UTF-8" /} {ENTRY} {ref href = "\Music\Artist\Album\Track1.mp3" /} {/ENTRY} {ENTRY} {ref href = "\Music\Artist\Album\Track2.mp3" /} {/ENTRY} {/ASX}
I can get as far as this:
{ASX version = "3.0"} {PARAM NAME = "Encoding" VALUE = "UTF-8" /} {ENTRY} {ref href = "\Music\Artist\Album\Track1.mp3" /} {/ENTRY} {/ASX}
using these calls:
.createChildNode "ASX", "ENTRY" .createChildNodeWAttr "ASX//ENTRY", "REF", "href", "\Music\Artist\Album\Track1.mp3"
However, as soon as I add another call:
.createChildNode "ASX", "ENTRY" .createChildNodeWAttr "ASX//ENTRY", "REF", "href", "\Music\Artist\Album\Track2.mp3"
then Track2.mp3 is added twice because there are now 2 parent nodes called 'ENTRY'. How can I create an ENTRY node with a child node 'REF' for every track?INVALID ARGUMENT*** |
|