[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-j-user
Subject:    Re: Supplying a custom DOM implementation
From:       Michael Glavassevich <mrglavas () ca ! ibm ! com>
Date:       2011-02-08 13:06:24
Message-ID: OF2207B8F3.5BF0078D-ON85257831.004762F1-85257831.00480004 () ca ! ibm ! com
[Download RAW message or body]

An instance of a class that implements org.w3c.dom.Document is the fact=
ory
for creating other nodes. If there's some reason that you need to / wan=
t to
examine and do further processing on the nodes as they're constructed y=
ou
can always register an LSParserFilter [1] with the parser.

Thanks.

[1]
http://xerces.apache.org/xerces2-j/javadocs/api/org/w3c/dom/ls/LSParser=
Filter.html

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

Vlad Arkhipov <arhipov@dc.baikal.ru> wrote on 02/08/2011 05:28:19 AM:

> I wonder why http://apache.org/xml/properties/dom/document-class-name=

> property refers to a class name but not to a class factory? It's
> common when you need some external information while parsing the
> document. For example, when you are building a DOM for HTML page
> it's necessary to have a reference to a window of this document. You
> may also need factories for creating elements of your Document. Now
> you can't set Document's properties before parsing is not done.=

[Attachment #3 (text/html)]

<html><body>
<p><tt>An instance of a class that implements org.w3c.dom.Document is the factory for \
creating other nodes. If there's some reason that you need to / want to examine and \
do further processing on the nodes as they're constructed you can always register an \
LSParserFilter [1] with the parser.</tt><br> <br>
<tt>Thanks.</tt><br>
<br>
<tt>[1] <a href="http://xerces.apache.org/xerces2-j/javadocs/api/org/w3c/dom/ls/LSPars \
erFilter.html">http://xerces.apache.org/xerces2-j/javadocs/api/org/w3c/dom/ls/LSParserFilter.html</a></tt><br>
 <br>
<tt>Michael Glavassevich<br>
XML Parser Development<br>
IBM Toronto Lab<br>
E-mail: mrglavas@ca.ibm.com</tt><br>
<tt>E-mail: mrglavas@apache.org</tt><br>
<br>
<tt>Vlad Arkhipov &lt;arhipov@dc.baikal.ru&gt; wrote on 02/08/2011 05:28:19 AM:<br>
<br>
&gt; I wonder why <a \
href="http://apache.org/xml/properties/dom/document-class-name">http://apache.org/xml/properties/dom/document-class-name</a><br>
 &gt; property refers to a class name but not to a class factory? It's <br>
&gt; common when you need some external information while parsing the <br>
&gt; document. For example, when you are building a DOM for HTML page <br>
&gt; it's necessary to have a reference to a window of this document. You<br>
&gt; may also need factories for creating elements of your Document. Now <br>
&gt; you can't set Document's properties before parsing is not done.<br>
</tt></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic