hi michael,

instead of writing the xml yourself, you can also use flash's xml-object to create it. below a simple and quick and dirty implementation of such a conversion function I just wrote (all list values are inserted as strings, it doesn't create nested tags for nested lists etc.):

on proplist2xml (tPropList)
 my_xml = newObject("XML")
my_xml.xmlDecl = "<?xml version='1.0' encoding='ISO-8859-1' standalone='yes'?>"
 rootnode = my_xml.createElement("root")
 my_xml.appendChild(rootnode)
 cnt = tPropList.count
 repeat with i = 1 to cnt
   node = my_xml.createElement("element")
   node.attributes.prop = string(tPropList.getPropAt(i))
   node.attributes.value = string(tPropList[i])
   rootnode.appendChild(node)
 end repeat
 return my_xml.toString()
end

but the created xml is definetely not the inversion of the xml-parser xtra, if that's what you need.

cheers,
valentin


Michael von Aichberger 2 wrote:
Hi List!

The XML Parser Xtra converts XML-formatted text into a Lingo property
list.

Now, I need to do the opposite: I have a property list and would like
to
convert that into an XML text.

Should be possible to code that in Lingo, but I don't know XML very
well nor
am I good in programming recursions which I think would be necessary.

Is there an Xtra or script out there that does that for me?

Thanks
Michael

[To remove yourself from this list, or to change to digest mode, go
to http://www.penworks.com/lingo-l.cgi  To post messages to the list,
email [email protected]  (Problems, email
[EMAIL PROTECTED]). Lingo-L is for learning and helping with
programming Lingo. Thanks!]

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to