RE: XML version number via DOM

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 UTC