Quick question: once I've parsed an xml document, I know I can add elements to any other element using the function xmlElemNew() - but I can't find a way to do that programatically.

Example: someone passes to my code:

<people>
    <person name="Avi Flax" heightfeet="6" heightinches="5" haircolor="brown"/>
</people>

and I want to return:

<people>
    <person name="Avi Flax" heightfeet="6" heightinches="5" haircolor="brown" personid="34442"/>
</people>

so that the calling app/module can match up the id returned to the record that was sent. I figure it'd be easier if I could just add my attribute in and pass the xml packet back, without having to rebuild the whole xml doc.

I tried structInsert() but that didn't seem to work:

StructInsert(xmlPeople.xmlRoot.xmlChildren[1].xmlAttributes, "personid", 34442);

no dice.

Any ideas? Thanks!
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to