[xml] Dealing with carriage returns and tabs in xml documents
- From: Patrick Hartmann <hartmann ind uni-stuttgart de>
- To: xml gnome org
- Subject: [xml] Dealing with carriage returns and tabs in xml documents
- Date: Thu, 21 Mar 2002 18:48:39 +0100
Hi,
when parsing a xml document like this:
<this>
<is>text</is>
<test>
</test>
</this>
using SAX all carriage returns and tabulators are considered as characters
and charactersSAXFunc shows them all.
Is there a way to filter them or better how can I get ONLY text without CR
from the callback function charactersSAXFunc(void *ctx, const xmlChar *ch,
int len)???
printf("%s",ch) is showing "text</" and NOT "text"
Example:
I want "text" between tags <is> and </is>
this one doesn't work:
<this>
<is>text</is>
<test>
</test>
</this>
bla bla
SAX.characters(
,2)
SAX.characters(test,4)
SAX.characters(
,2)
this one is o.k. but unreadable
<this><is>text</is><test></test></this>
SAX.characters(text,4)
Thank you
Patrick :-}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]