Navigating XML in LiveCode
Ken Ray
kray at sonsothunder.com
Mon Jan 23 13:25:11 EST 2012
> If you're using my script-only stsXMLLibrary, you'd do this:
>
> put "/root/employees" into tRootNode -- makes it easier to work with
> put stsXML_LoadData(tMyXML) into tDocID
> put stsXML_AppendChild(tDocID & tRootNode,"ELEM","employee") into tNewNodeID
> get stsXML_SetAttribute(tNewNodeID,"firstName","Graham")
> get stsXML_SetAttribute(tNewNodeID,"lastName","Samuel")
Whoops! Sorry, forgot a param on the last two lines… it should have been:
get stsXML_SetAttribute(tNewNodeID,"firstName","Graham",true)
get stsXML_SetAttribute(tNewNodeID,"lastName","Samuel",true)
Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
More information about the use-livecode
mailing list