This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: How to normalize XML???
- From: "bryan" <bry at itnisk dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Mon, 12 Aug 2002 11:47:28 +0200
- Subject: RE: [xsl] How to normalize XML???
- Reply-to: xsl-list at lists dot mulberrytech dot com
> >
> > Is there any way in Xerces or JAXP API to
> normalize
> > the spaces from the XML.
> > <Source>
> > <Arg>some text</Arg>
> > </Source>
> > I have an indented XML as above and whenever I
> parse
> > it, I expect single child under Source node but it
> > give me nodelist of 3 elements just because my xml
> is
> > indented.
> >
> > Do I need to write my xml inline, or check the
> element
> > type for every node ???
> >
there's a better xpath for this then the one I'm going to give you now,
but I can't remember it so here goes:
child::node()[name()!='']
although if you're always dealing with <Arg> then you should just select
for <Arg>
normalize() normalizes the text.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list