![]() |
| ||
| Eliminating Whitespace characters while parsing XML Files using DOM Hi all , I'm having problem during parsing xml files using DOM API due to whitespace characters. Here is my sample XML File ,coding and output : XML File : <demo>Coding : import java.io.*;Output : root ==> demoI have only one chid but i got the number of child of rootelement as "3" due to whitespace character as shown in output(#text) but when i manually type XML Files in LINEAR fashion means i'm getting correct output . LINEAR FASHION XML FILE: <demo><empid>e100</empid></demo>but i used a code that automatically generate xml format . So , how to eliminate that (#text) ? Thanks |
| ||
| Re: Eliminating Whitespace characters while parsing XML Files using DOM You don't. You rather learn to use the XML parser properly and explicitly read only those elements from the tree that you actually need. |
| All times are GMT -4. The time now is 12:52 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC