Re: development 1.1.1 version of XmlPull API

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

> >>I am still having some trouble with kXML and the tests:
> >>
> >>- the tests seem to imply that the reader/input stream
> >>   must not be touched until the first call to next().
> >>   In my opinion, setInputStream (is, encoding) should
> >>   be allowed to determine the encoding immediately (as
> >>   far as I remember, we already had a corressp. dicussion
> >>   here in the list...??)
> >>
> >
> > i will change tests to reflect it - which one were not working?
>
> junit.framework.AssertionFailedError: read() not called before next()
> expected:<false> but was:<true>
>
> TestSetInput.java:144

i have changed it.

i would like to return to it in some future as i still think that
setInput() should have no side effects (ie. reading byte from input)
and this can be easily accomplished in  implementation of next()
that basically reads and detects encoding when parser is
on START_DOCUMENT state.

> >>- in my opinion, setPrefix should be setPrefix (String prefix,
> >>   String namespace), instead of setPrefix (String namespace, String prefix)
> >>   in order to reflect the xmlns:prefix="namespace" order??
> >>
> >
> > you are right this is more logical - i will change it now.
>
> thanks!

it seems that API was OK just namespace name used in test (n1)
looks too similar to prefix. i have changed it.

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.