W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2001

RE: XML version number via DOM

From: Watson, Christopher <CWatson@lightspan.com>
Date: Thu, 22 Mar 2001 06:41:53 -0800
Message-ID: <92976FF84DEAD41191930002A52CF7A247B36A@exchange.lightspan.com>
To: "'www-DOM@w3.org'" <www-DOM@w3.org>
Again, we're talking about implementation instead of specification, but as
far as I know, the XMLDecl is not a child of any parent. The Document is
only supposed to have one child, right? The document element.

Xerces has an implementation-specific XMLDecl interface. I think the XMLDecl
object is just stored in the Document, and thier Document interface
extensions allow you to get at it. The XMLDecl interface provides for
accessing its version, encoding and standalone attributes.

Christopher Watson
Sr. Software Engineer
Creator, Lingo-DOM
Lightspan, Inc.

-----Original Message-----
From: Dylan Schiemann
To: Jeff Yates; www-DOM@w3.org
Sent: 3/21/01 7:16 PM
Subject: Re: XML version number via DOM

Jeff,

I would think that it would be an attribute of that
node. So
document.childNodes[index].getAttribute("version")
would do the trick, assuming a correct implementation.


-Dylan Schiemann

--- Jeff Yates <pbwiz@pbwizard.com> wrote:
> At the beginning of every XML document there is a
> <?xml version="1.0" ?>
> tag.  Is there a way to get this version number from
> within DOM?  I know at
> this time there is only one version number, but in
> the future there may be
> more.
> 
> Jeff Yates
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/


Received on Thursday, 22 March 2001 09:42:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:48 GMT