Re: writer state acces
Aleksander Slominski <[email protected]>
| Newsgroups | gmane.text.xml.xmlpull.devel |
|---|---|
| Message-ID | <[email protected]> |
Stefan Haustein wrote:
> I think for the writer it may be important to be able to query
> the prefix of a given namespace; for example in xml schema and
> soap qnames are addressed via prefix:name combinations in
> attribute values. Of course, it would be also possible that the
> application keeps track of this, but the writer needs to do so
> anyway....
hi,
i think that you are right - what about this:
/**
* Return namespace that corresponds to given prefix
* If there is no prefix bound to this namespace return null if
* generatePrefix is false otherwise return null.
*/
public String getPrefix (String namespace, boolean generatePrefix);
it would deal with case when namespace prefix needs to be generated.
i have added it to XmlSerializer.java - is it what you had in mind?
thanks,
alek