Skip to Content.
Sympa Menu

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

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Michael Kay" <mike AT saxonica.com>
  • To: "'ozkan ozcan'" <ozcozk AT gmail.com>, <XOM-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Ignoring white spaces and line breaks betweenelements
  • Date: Thu, 22 Dec 2005 10:48:04 -0000

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

It might not be what you expect, but it is correct behaviour according to
the XPath specification.

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

You can insert a simple SAX filter that removes whitespace-only text nodes.

Michael Kay
http://www.saxonica.com/






Archive powered by MHonArc 2.6.24.

Top of Page