JaedenRuiner
Well-known member
- Joined
- Aug 13, 2007
- Messages
- 340
- Programming Experience
- 10+
Wow,
Why i ever took so long to look into the basis of XML I'll never know, but now that I'm here (finally) I am thrilled. Especially with the ease and simplicity the programmatic xml objects make it.
However, I was wondering about the formatting issue of the WhiteSpace and TextNodes.
Basically, you create elements and attributes for those elements within the XMLDocument structure, and when you output those elements you get something like this:
Pretty ain't it?
Anyway, whenever you add a child node to the "terminated" element (<mapping />) it adjusts appropriately, adding the termintor element, (</mapping>). however, when it is a TextNode it adds it to the same line:
And if you try to use the whitespace node or other such invention you get:
Is there a way to determine the indentation level of a particular node, is it always 2 spaces per child indent, or something to that effect?
Yea, I know this sounds pointless, but I'm just curious in order to better understand the interpretation and uses of these different nodes.
As well, if you have an Element Node that creates a TextNode within it, any subsequent child nodes are not line-fed and indented on the next line.
Thanks
Why i ever took so long to look into the basis of XML I'll never know, but now that I'm here (finally) I am thrilled. Especially with the ease and simplicity the programmatic xml objects make it.
However, I was wondering about the formatting issue of the WhiteSpace and TextNodes.
Basically, you create elements and attributes for those elements within the XMLDocument structure, and when you output those elements you get something like this:
HTML:
<?xml version="1.0" encoding="Windows-1252"?>
<!DOCTYPE rexamship.cfg>
<settings user="default">
<xlColumnMap>
<column index="1" letter="A">
<mapping purpose="0" />
</column>
</xlColumnMap>
</settings>
Pretty ain't it?
HTML:
<column index="1" letter="A">
<mapping purpose="0">My Text</mapping>
</column>
And if you try to use the whitespace node or other such invention you get:
HTML:
<column index="1" letter="A">
<mapping purpose="0">
My Text
</mapping>
</column>
Is there a way to determine the indentation level of a particular node, is it always 2 spaces per child indent, or something to that effect?
Yea, I know this sounds pointless, but I'm just curious in order to better understand the interpretation and uses of these different nodes.
As well, if you have an Element Node that creates a TextNode within it, any subsequent child nodes are not line-fed and indented on the next line.
Thanks