xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
Re: [XOM-interest] Ignoring white spaces and line breaks between elements
- 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
-
[XOM-interest] Ignoring white spaces and line breaks between elements,
ozkan ozcan, 12/22/2005
- <Possible follow-up(s)>
-
[XOM-interest] Ignoring white spaces and line breaks between elements,
ozkan ozcan, 12/22/2005
- Re: [XOM-interest] Ignoring white spaces and line breaks betweenelements, Michael Kay, 12/22/2005
- Re: [XOM-interest] Ignoring white spaces and line breaks between elements, Elliotte Harold, 12/22/2005
Archive powered by MHonArc 2.6.24.