Re: asymmetry between serialzier and parser inwritingXMLDecl

Iain Shigeoka <[email protected]>
Newsgroups gmane.text.xml.xmlpull.devel
Message-ID <B990F559.A262%[email protected]>
On 8/27/02 8:52 AM, "Aleksander Slominski" <[email protected]>
wrote:

> OK. this is more elegant approach. let do it this way:
> * XMLDecl is not reported as PI
> * after next() or nextToken() is called user application can obtain
> XML version, standalone and encoding from XML declaration
> in following ways:
> #  version: getProperty("
> http://xmlpull.org/v1/doc/properties.html#xmldecl-version")
>       returns String ("1.0") or null if XMLDecl was not read
> # standalone: getProperty("
> http://xmlpull.org/v1/doc/features.html#xmldecl-standalone")
>       returns Boolean: null if there was no standalone declaration
>         Boolean(true) if standalon="yes" and Boolean(false) when
> standalone="no"
> # encoding: obtained from getInputEncoding()
>       null if stream had unknown encoding (not set in setInputStream)
>           and it was not declared in XMLDecl
> 
> how does it sound?

Sounds much better to me.

-iain
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.