PDA

View Full Version : Converting one format of xml to another


Sarika Jain
01-13-2005, 06:27 AM
Hi Antun,

I have been successful in saving the data entered on the Laszlo page to xml.I have done it programatically.
Output Format ::>>

<xml>
<person>
<firstname>Sarika </firstname>
<middlename>K</middlename>
<lastname>Jain</lastname>
</person>
</xml>



Now, When I was trying to display the same data on the Laszlo screen using this format,I found that Laszlo uses different format for reading XML data which is as follows:
<phonebook>
<contact firstName="John" lastName="Smith" phone="617-536-7855"
email="jsmith@mail.com"/>
<contact firstName="Lisa" lastName="Jones" phone="415-225-8743"
email="ljones@mail.com"/>
<contact firstName="Mary" lastName="Brown" phone="212-665-5211"
email="mbrown@mail.com"/>
</phonebook>


Is there any , I can read the data from the xml file and display on the screen using below format ::>>
<xml>
<person>
<firstname>Sarika </firstname>
<middlename>K</middlename>
<lastname>Jain</lastname>
</person>
</xml>


I appreciate your response for my previous queries.
I am very optimistic about this product.

Thanks & Regards,
Sarika

Fester
01-13-2005, 07:28 AM
It can be done, but it is not very straightforward. Search these forums for an answer, I found it also here. I don't have my code right here, otherwise I would have given you an example.

regards,

Fester