RE: How to normalize XML???
> > > > 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
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format