What is normalizing in XML?

S

sivasu.india

Hi,

Can anybody explain me what is normalizing in XML with an
Example.What is the use of the following method in Node interface in
org.w3c.dom

public void normalize()


What this method will do? Can anyone explain me with an example?
 
J

Joshua Cranmer

Hi,

Can anybody explain me what is normalizing in XML with an
Example.What is the use of the following method in Node interface in
org.w3c.dom

public void normalize()


What this method will do? Can anyone explain me with an example?
What this method does is combine all adjacent text nodes into one, via
something like this pseudocode:

for all nodes which have this node as an ancestor:
if node is a text node:
if nextSibling is a text node:
append nextSibling.nodeValue to my nodeValue
remove nextSibling from tree
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top