You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Nickolay Kolev <nm...@gmx.li> on 2002/09/12 14:59:24 UTC
Ignoring Whitespace
Hi All,
I am a first time poster.
Could anyone please point me to (or give me) a tip on ignoring the
whitespace in XML elements (tabs, newlines, etc.)... I am using JDK 1.4.
1 and SAX (do you say "I use SAX"??).
I am trying to get the sum of the contents (just numerical data) of all
elements in a file but get errors.
If I write the file as one line (no tabs or newlines) if works without
complaints.
Also I would like to know how to isolate the case in which there will
be elements containing data other than numerical. (For example: <num>
elements will contain the numerical data, all others some other data).
How do I get the contents of only the <num> tags?
I have tried searching the Java documentation, and generally the net
but had no luck so I thought I'd ask.
Sorry if I am bothering you with too newbie questions!
Many thanks in advance,
nmk
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org