maxml strange bugs???

BlitzMax Forums/BlitzMax Programming/maxml strange bugs???

skn3(Posted 2007) [#1]
Is it me or is the pub.maxml module completely broken ?

I have this piece of code:
						'update xml file and add record
						Local temp_xml:xmlDocument = New xmlDocument
						Local temp_node:xmlNode
						
						temp_xml.load("history.xml")
						
						If temp_xml <> Null
							'add the record
							temp_node = temp_xml.root().addnode("peer")
							temp_node.value = nname
							
							'save teh xml file
							temp_xml.save("history.xml");
							temp_xml = Null
						End If


An it seems to spit out this file!
<?xml version="1.0"?>
<root>
  &#9;
  <peer/>
</root>


What am I doing wrong ?


skn3(Posted 2007) [#2]
Well I figured the 2 issues.

The &#9; is the tab character being escaped instead of being used as an indent.

The single <peer/> is when the node has not value.