XML Automation Empty Tag / Result only in one line

SonGoten13SonGoten13 Member Posts: 44
Hi

I have following Code. Creation of a simple XML Document.
CREATE(xmlDoc);
xmlMgt.SetNormalCase;
NodeLvl := xmlDoc.createElement('parent');
NodeLvl := xmlDoc.appendChild(NodeLvl);
xmlMgt.AddElement(NodeLvl,'child','','',NewChild);
xmlDoc.save('C:\foobaz.xml');

Variables:
Name	DataType	Subtype	Length
xmlMgt	Codeunit	XML DOM Management	
xmlDoc	Automation	'Microsoft XML, v6.0'.DOMDocument	
NodeLvl	Automation	'Microsoft XML, v6.0'.IXMLDOMNode	
NewChild	Automation	'Microsoft XML, v6.0'.IXMLDOMNode	

as a Result i get
<parent><child/></parent>

Is it possible to get the Result like this:
1) without abbreviation
<parent><child></child></parent>

2) not everything in one line but in a structured way ?
<parent>
<child>
</child>
</parent>

1) one external program i want to import the file, handles this things differently
2) Just looks a lot nicer

i use NAV 2009 SP1 Classic Client

greetings
Sign In or Register to comment.