XML one-liner (if possible)

Sarah Reichelt sarah.reichelt at gmail.com
Tue Jul 13 18:55:02 EDT 2010

On Wed, Jul 14, 2010 at 7:19 AM, viktoras d. <viktoras at ekoinf.net> wrote:
> err., what's the simplest way of displaying all contents of an XML document
> in a rev field? e.g. getting a list of all elements with all their
> attributes and values. Is there a simple way to do this - a one liner
> probably ;-) ?

Not a one-liner, but try this:

   put URL ("file:" & tFileName) into tData
   put revCreateXMLTree(tData, false, true, false) into tDocID
   put revXMLRootNode(tDocID) into tParentNode
   put revXMLText(tDocID, tParentNode, true) into tXML

After every call to a revXML function, you can check the result for
"xmlerr" which indicates a problem.


More information about the Use-livecode mailing list