I have built a small integration app using VS .NET 2003 that extracts
orderinformation from a 'webshop'. Extracting the orderinformation works fine.
Appending the order elements in the XmlDocument was also done in a jiffy.
The final step is to save the document to disk and then ship it to another
system using ftp. The xml orderfile produced must fit a set specification of
the recieving system. That specification states that empty elements must be
formated in one line using a long format for empty elements.
It should look like this:
<address1></address1>
And not like this:
</address1>
Or this:
<address1>
</address1>
When I save the xml order document to disk all empty elements are formatted
with a carridge return (0x0D) and linefeed (0x0A). Is it possible to force
output format of empty elements somehow? I want the empty elements formated
like this <address1></address1> - without the carridge return and linefeed.
I've looked at and tried the PreserveWhitespace property of the XmlDocument.
I've also looked at XmlNodeType and the difference between WhiteSpacehandling
and Significat WhitespaceHandling. It has made me all confused.
I realize that there are probably resonable explanations for this complexity
but right now I'm just looking for a quick answer.
Any help would be very appreciated!
Thanks,
Clark Spencer