The XML object has some class properties ("prettyPrinting", "prettyIndent") that are probably relevant: http://jongware.mit.edu/idcs6js/pc_XML.html . But I think the defaults should give you what you want, so I don't know why you're seeing what you're seeing if you haven't changed them.
Thanks, but do you have an example because I had already test but I can't get it to work.
Are you setting those properties on the class or an instance? It's a class property.
var file = new File("~/Desktop/temp/sample.xml"), xml; file.open('r'); xml = new XML(file.read()); file.close(); XML.prettyPrinting = false; alert(xml.toXMLString());
gives you the smushed-together output:
XML.prettyPrinting = true; alert(xml.toXMLString());
OK, I have not too usual but the configuration of these deuxligne and this function:
XML.prettyIndent = 5;
XML.prettyPrinting = true;
I would like to used the class "namespace".
Currently I use it like this:
default xml namespace = 'http://www.idpf.org/2007/opf';
but I also have to put the two following
unique - identifier = "bookid" version = "2.0".
But my its too short deep.
Thank you I went out with this
leFichierContentXML.@['xmlns'] = 'http://www.idpf.org/2007/opf';
leFichierContentXML.@['unique-identifier'] = 'bookid';
leFichierContentXML.@['version'] = '2.0';