xml = CreateXML(#PB_Any)
mainNode = CreateXMLNode(RootXMLNode(xml), "Zoo")
; Create first xml node (in main node)
item = CreateXMLNode(mainNode, "Animal")
SetXMLAttribute(item, "id", "1")
SetXMLNodeText(item, "Elephant")
; Create second xml node (in main node)
item = CreateXMLNode(mainNode, "Animal")
SetXMLAttribute(item, "id", "2")
SetXMLNodeText(item, "Tiger")
; Display the xml
result$=~"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+ComposeXML(xml)
Debug result$
Of course if you are using ExportXML() then this won't help ;(
I thought maybe SetXMLEncoding() might add this info since the docs make me think it should do something but when I try and use this command the browser gives an error saying "spider_SetXMLEncoding" is not defined, so no idea.