Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Ignoring white spaces and line breaks between elements

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: ozkan ozcan <ozcozk AT gmail.com>
  • Cc: XOM-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Ignoring white spaces and line breaks between elements
  • Date: Thu, 22 Dec 2005 06:04:32 -0500

ozkan ozcan wrote:

when i try to extract all Text nodes with XPath (//text()), I get line
breaks also as Text nodes, which is not expected.

That is what your XPath expression asks for though.

But when I do the same thing without pretty-printed, everything in one line
I get what i want.

Try this XPath expression instead

//text/text()

Is there an easy way of making Builder ignore line breaks.

See nu.xom.samples.NormalizingFactory.

--
´╗┐Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim




Archive powered by MHonArc 2.6.24.

Top of Page