Re: XmlSerialzier

Aleksander Slominski <[email protected]>
Newsgroups gmane.text.xml.xmlpull.devel
Message-ID <[email protected]>
Stefan Haustein wrote:

> (...)
> > therefore we never return 'null' for namespace in XmlPullParser
> > but empty string.
> >
> > so i think that in XmlSerializer we should have similiar approach:
> > * prefix and namespace must be always not null for setPrefix()
> > * and getPrefix() will return null only when
>
> The problem are prefixes, not namespaces: In the parser, null is
> returned for "no prefix" (see javadoc).

ok i see it now:
http://www.xmlpull.org/v1/doc/api/org/xmlpull/v1/XmlPullParser.html#getAttributePrefix(int)


> In the serializer, null
> would be returned from getPrefix for "no prefix defined", and an
> empty string would be returned for namespace is default (no
> prefix in elements required). This seems a bit inconsistent, but
> it would be fine with me...

ok i think that it will be also fine as long as we document it well
i checked in some clarifications - please take a look .

thanks,

alek
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.