Re: xml pull junit tests

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

> the TestSerializeWithNS seems to assume that endDocument closes
> all open elements. I think it would be cleaner to throw an
> IllegalStateException if endDocument is called while still
> tags are open?

hi,

this is just for convenience -  when closing documents it makes sense to
close all unclosed tags by writing them.

    /**
     * Finish writing. All unclosed start tags will be closed and output
     * will be flushed. After calling this method no more output can be
     * serialized until next call to setOutput()
     */
    public void endDocument ()
        throws IOException, IllegalArgumentException, IllegalStateException;

do you think that this shoul dbe an error condition?

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.