Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 42048 invoked from network); 18 Jul 2002 20:01:24 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 18 Jul 2002 20:01:24 -0000 Received: (qmail 23977 invoked by uid 97); 18 Jul 2002 20:01:41 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 23950 invoked by uid 97); 18 Jul 2002 20:01:40 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 23938 invoked by uid 98); 18 Jul 2002 20:01:39 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) From: "Per Kreipke" To: "Jakarta Commons Developers List" Subject: RE: [jxpath] Using DOM without reloading a file... Date: Thu, 18 Jul 2002 16:03:50 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Importance: Normal In-Reply-To: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Additional question: - how about instantiating a container with any DOM Node, not just a Document? Per > It would be nice if JXPath could use an existing DOM model > without having to > load it itself. Perhaps this isn't possible in the current system but... > > - why not have an additional constructor for XMLDocumentContainer which > simply sets the document? > > XMLDocumentContainer(org.w3c.dom.Document doc) > { > this.document = doc; > } > > - alternatively, why is the document object private and not protected such > that classes can subclass and add their own constructors. > > - then objects could serve the DOM from an in memory copy > > - manipulate the DOM outside of JXPath and have those changes > automatically > reflected. > > > You could just do this by defining a small subclass of Container yourself: > > public class DOMContainer > { > Document document; > > DOMContainer(Document doc) { this.document = document; } > > public Object getValue() { return this.document } > > public > }; > > > or even implementing Container itself on some object that already > contains a > DOM object. > > > Any reason XMLDocumentContainer doesn't do this (e.g. JXPath > caches Pointers > that invalidates all of this)? > > Thanks, > Per Kreipke > > > -- > To unsubscribe, e-mail: > > For additional commands, e-mail: > > > -- To unsubscribe, e-mail: For additional commands, e-mail: