Krzysztof Zielinski wrote:
>
> Could you give an example of DTD that tell that there can't be any '\n'
> or any other space characters exept text which is an element value ?
Here:
That says element A contains an element B followed by an element C (and
nothing else). In that case any whitespace
Could you give an example of DTD that tell that there can't be any '\n'
or any other space characters exept text which is an element value ?
Thanks
K.
Arnaud Le Hors schrieb:
>
> Krzysztof Zielinski wrote:
> >
> > I have set that feature, but when I am displaying DOM tree, there are
> > still t
Krzysztof Zielinski wrote:
>
> I have set that feature, but when I am displaying DOM tree, there are
> still those elements.
You also need a DTD that tells the parser what is "ignorable"... This is
done by specifying that your elements only contain elements.
--
Arnaud Le Hors - IBM Cupertino, X
I have set that feature, but when I am displaying DOM tree, there are
still those elements.
Andy Clark schrieb:
>
> sadlion wrote:
> > parser.setIncludeIgnorableWhitespace (false) ;
>
> It's better to use the configuration methods available via
> SAX2. There is a feature defined for this. For ex
But I need to have a DOM tree, as I need to modify some text elements
after I read document from the file. SAX2 doesn't create DOM tree, does
it ?
Andy Clark schrieb:
>
> sadlion wrote:
> > parser.setIncludeIgnorableWhitespace (false) ;
>
> It's better to use the configuration methods available
sadlion wrote:
> parser.setIncludeIgnorableWhitespace (false) ;
It's better to use the configuration methods available via
SAX2. There is a feature defined for this. For example:
parser.setFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace";,
false);
C
t; <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 17, 2001 7:42 PM
Subject: '\n' characters in DOMtree
> I am reading an XML and creating DOMTree using Xerces. Unfortunately
> characters like '\n' are also read from the file.
>
> What
I am reading an XML and creating DOMTree using Xerces. Unfortunately
characters like '\n' are also read from the file.
What to do in order to avoid those characters in the DOMTree ?
Or how to avoid them when manipulating DOMTree,and then sending it to
Xalan2 transformer ?
Thanks.