Wednesday, August 21, 2013

Normalization in DOM parsing with java - how does it work?

The rest of the sentence is:
where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes.
This basically means that the following XML element
hello 
wor
ld
could be represented like this in a denormalized node:
Element foo
    Text node: ""
    Text node: "Hello "
    Text node: "wor"
    Text node: "ld"
When normalized, the node will look like this
Element foo
    Text node: "Hello world"
And the same goes for attributes: , comments, etc.

No comments:

Post a Comment