PDA

View Full Version : Write XML file


red-arrow
07-16-2005, 03:56 AM
Hi!!!
I'm new. I have a data file xml and I tried to add new rows (a new contact for example) but it didnt't work.
Is there anybody that can tell me how to modify this file (update existing records or adding new ones)?
Thank you.

Andrea

mmenti
07-16-2005, 02:29 PM
There is an example of this in the Software Developer's guide installed with OpenLaszlo (under "Working with datapointers"/ "Binding data to a new node") at
http://localhost:8080/lps-3.0/docs/guide/data_app.html#d0e19918

red-arrow
07-17-2005, 01:16 PM
I've tried it... but i don't know how to create a database in jsp. I'd like to use only an XML file, not a relational database. How can i do?
Thanks


Andrea

mmenti
07-18-2005, 12:42 AM
Andrea,

if you look at chapters 3, 4 and 5 in the page whose URL I've posted previously, you see a lot of code and examples that relate to updating the phonebook xml. There is no jsp or rdb involved in these examples, it's purely Laszlo and data held in an XML file.

red-arrow
07-18-2005, 12:56 AM
I have already watched these exmaples but when I refresh the application the XML file is the same, it didn't change. I need to modify this file.

Thank U

d~l
07-18-2005, 01:57 AM
If you created the XML file yourself .. start by validating the XML file to make sure it has no bugs such as white space etc.

Any XML editor will validate the content.

There is an XML Spy Home Edition (free) at http://www.altova.com.

Then move on to reading the Laszlo tutorials.

red-arrow
07-18-2005, 02:38 AM
At this time i'm not using my XML file. I was tryng to use the phonebook example but when I restart my application the XML file is the same. The change are temporary... why?
Thanks

srusi
07-26-2005, 12:05 PM
Hi! Have you found a solution to your problem? 'cause I've tried the same and I couldn't.
Thanks

ilanToren
07-26-2005, 11:13 PM
>At this time i'm not using my XML file. I was tryng
>to use the phonebook example but when I restart my
>application the XML file is the same. The change
>are temporary... why?
>Thanks

I think you've run into a javascript limitation. Generally web pages are not supposed to be able to change data on the server, except via a cgi type call.

mmenti
07-27-2005, 04:11 AM
You may find this thread useful too:

http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=2828&highlight=xml+dataset+update