baanware
5th December 2008, 11:01
Hi,

I need to format an XML-node as follows:
<command type="database">TRUNCATE_TABLE</command>

The node can be written without the >TRUNCATE_TABLE< as folllows:
xml_mainnode = xmlNewNode("command", XML_ELEMENT, xml_fileid)
xmlSetAttribute(xml_mainnode, "type", "database" )

Can anybody tell me how to add the >TRUNCATE_TABLE< ?

Thanks!

SergioRuiz
5th December 2008, 12:49
Hello, try this:

domain tcmcs.long node.id, ret

node.id = xmlnewDataElement("command", "TRUNCATE_TABLE")
if node.id <> 0 then
ret = xmlsetAttribute(node.id, "type", "database")
endif

baanware
9th December 2008, 00:06
Hi Sergio,

Thanks for your very fast and precise solution.

I am embarassed that it was that simple, but at the same time very happy that the solution was found!

Thanks again!

Best regards
Soeren