Return-Path: Delivered-To: apmail-xml-general-archive@xml.apache.org Received: (qmail 33013 invoked by uid 500); 15 May 2001 19:19:24 -0000 Mailing-List: contact general-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: general@xml.apache.org Delivered-To: mailing list general@xml.apache.org Received: (qmail 32897 invoked from network); 15 May 2001 19:19:03 -0000 Message-ID: From: "Arnold, Curt" To: "'general@xml.apache.org'" Cc: "'petar.banicevic@siemens.hr'" Subject: RE: NodeList problem when using node.getChildNodes Date: Tue, 15 May 2001 13:14:26 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N The general list is not the appropriate forum for questions on an specific project, the xerces-j-user mailing list would seem to be appropriate. You might want to give some XML and code fragments to state the problem and also the specific version of the Xerces parser that you are using. It seems that you have something like: Some text Any you are doing something like: NodeList list = doc.getDocumentElement().getChildNodes(); I'm not sure what you mean by: > When I call node.getChildNodes for the result I get: > the object having the same reference as node. > (to be more clear I get the same thing as node, but type is NodeList) > > This confuses me I expected to get one text node. > The childNodes property (which is exposed by the getChildNodes() method in the Java binding) returns a NodeList which does not inherit from Node. By my reading of the spec, you should never expect getChildNodes() to give you anything other than a NodeList, in this case a NodeList with a length of 1. NodeList does not inherit from Node, so I don't see why you think it is the same thing as a Node. Could you restate the problem on xerces-j-user and then maybe I or someone else can answer it. Have you read the definition of the childNodes property and NodeList interface in the DOM spec? http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1950641247 --------------------------------------------------------------------- In case of troubles, e-mail: webmaster@xml.apache.org To unsubscribe, e-mail: general-unsubscribe@xml.apache.org For additional commands, e-mail: general-help@xml.apache.org