PDA

View Full Version : Need help. How to add element to XML???


dmla
10-19-2004, 06:00 AM
Need help. How to add elements to XML file???

I have XML file. I can add lines (elements) in NotePad, but I want to make program in AMS5.0 for adding/editing/deleting elements in XML database.

Help please who know how to add elemets to XML database.

TJ_Tigger
10-19-2004, 07:50 AM
Have you tried to use XML.SetValue to create a new element? It doesn't specifically state that it will create a new element if one does not exist but it appears like it will. Otherwise you could use the XML.Insert to insert raw XML code.

Tigg

dmla
10-20-2004, 02:26 AM
I thought that XML.SetValue can set only existable values.
About XML.Insert I didnt find any info in XML plugin help.
Could you give me more info about XML.Insert ?

TJ_Tigger
10-20-2004, 08:19 AM
Here is the link to the online help file from www.autoplay.org.

XML Plugin Help (http://www.autoplay.org/help/xml_plugin.htm#XML.InsertXML)

The XML.SetValue doesn't state if it will create a new element if one does not exist, but I suspect that it will. Try it out and see what it does.

Tigg

Lorne
10-21-2004, 03:20 PM
Note: XML.Insert was added in the latest version of the XML plugin.

dbrown
11-10-2004, 03:05 AM
A little frustration here for a newby...

I can add an element, but when I try to insert the xml data after a particular node, it places it within the previous tag so I end up getting the record combined with the previous one and bc the tags are not closed properly, things get messed up. If anyone has any experience with this issue, your wisdom is welcome and appreciated!