On Sat, 2006-10-14 at 07:32 -0700, Sema wrote: > Hi, > > I know that we can use XSLT to transform a data flow from XML to any other > format. But how can I transform NON-XML to XML? XSLT does not function in > that case.
Your question is vague and ill-formed, without knowing what form the source data is in how could one answer? However, the general answer is you would create a new document with xmlDoc(), traverse your data and add child nodes along the way with newChild(). When you are finished with your traversal write your doc out with serialize(), then free the doc dom tree you created. You'll have to decide in advance what the structure will be for your tree, what's an element, what's an attribute, etc. The traversal may most easily be done with a scripting language such as python (I think perl has libxml2 bindings as well). -- John Dennis <[EMAIL PROTECTED]> _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
