Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java xml : normalize a dom structure

Status
Not open for further replies.

jbruggeman

Programmer
Jun 24, 2002
6
0
0
BE
Hi,

I use j2sdk version 1.4.0 (under windows NT workstation) - downloaded at
The code that produces a problem is:

<snip>
...
Import org.w3c.com;
...
Document menu = null;
File bestand = null;
...
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setValidating(false);
DocumentBuilder DomParser = dbf.newDocumentBuilder();
bestand = new File(args[0]);
menu = DomParser.parse(bestand);
menu.normalize();
....
</snip>

This code does not produce a normalized menu object: the blank nodes are not omitted. In fact, nothing changes to the menu object when the normalize function is invoked. No error statements are received when compiling, no exceptions are thrown either.

Any clues ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top