You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "O.K." <ch...@gmx.at> on 2003/10/05 16:56:48 UTC
Simple configuration questions?
Hello!
I seem to be unable to find options for certain parsing
configurations... when I parse an XML-document, it also includes
Comments and even reads "new line" as text-nodes ('\n') ... is it
possible to turn that off? I don't need the comments, they are just
used for human readers and I don't need the '\n' to work one the
Document.
sorry, it is probably a very simple task and can be found in the
documentation, but as said, I can't find it.
Thanks for answering
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: Simple configuration questions?
Posted by Gareth Reakes <ga...@decisionsoft.com>.
Hi,
>
> I seem to be unable to find options for certain parsing
> configurations... when I parse an XML-document, it also includes
> Comments and even reads "new line" as text-nodes ('\n') ...
DOMConfiguration will give the ability to prevent comments from parsed and
the feature whitespace-in-element-content will prevent the "ignorable
whitespace) from being included. You must have provided a DTD or schema
that specifies that it can be ignored. DOMConfiguration is not yet
implemented for parsing (IE DOMBuilder). It is partially implemented
(including the ability to remove comments) when you use it and call
normalizeDocument.
> is it
> possible to turn that off? I don't need the comments, they are just
> used for human readers and I don't need the '\n' to work one the
> Document.
It is currently possible to do the ignorable whitespace if you do
DOMBuilder->setFeature(X("whitespace-in-element-content"))
Note that you must have specified a DTD/schema.
Gareth
--
Gareth Reakes, Head of Product Development +44-1865-203192
DecisionSoft Limited http://www.decisionsoft.com
XML Development and Services
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org