set doc [dom parse {<Info><FirstName>Hai</FirstName><LastName>Vu</
LastName></Info>}]
$doc standalone 1
$doc encoding UTF-8
$doc omit-xml-declaration 0
puts "[$doc asXML]"
****************
The actual output:
<Info>
<FirstName>Hai</FirstName>
<LastName>Vu</LastName>
</Info>
****************
How do I change the code so the output is:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Info>
<FirstName>Hai</FirstName>
<LastName>Vu</LastName>
</Info>
****************
I have played with the omit-xml-declaration, encoding, standalone
subcommands to no avail. Your help is greatly appreciated. Thank you.
The simplest technique is to just [puts] the declaration yourself.
That also makes getting the encoding in the decl right easier.
Donal.
Donal,
Thank you for your suggestion. At this point, it is the only option
for me.
Hai