wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes XML Parsing  - Ignore New line character Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "XML Parsing  - Ignore New line character " Watch "XML Parsing  - Ignore New line character " New topic

XML Parsing - Ignore New line character

nomad shankar

Joined: Aug 26, 2012
Posts: 1
when I parse an XML using Dom parser , I want to igonre new line characters present in it ..can any one help me
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41085
XML parsers don't do content filtering. That's something you would have to do after the parsing is finished. If you were using a SAX or StAX parser instead of DOM, this kind of thing would be easier to implement because you have more control over the parsing process.

Ping & DNS - my free Android networking tools app
It is sorta covered in the JavaRanch Style Guide.
subject: XML Parsing - Ignore New line character
Similar Threads
backslash n is being escaped against my will
Adding newline using MSXML DOM
setLineWidth() in OutputFormat class
New Line Character not recognized
SAX parser: handling empty tags