XMLSerializer and default namespaces

Iain Shigeoka <[email protected]>
Newsgroups gmane.text.xml.xmlpull.devel
Message-ID <BA65DD02.13314%[email protected]>
Hi,

I've been using the XMLSerializer and really enjoy the API. The only feature
that I feel would be really helpful is some way to tell the serializer that
I'd prefer a certain start tag namespace declaration be a default namespace
declaration rather than have it generate and use a prefix for itself and all
children.

I was thinking that we could set the default the behavior of the serializer
via a feature (use prefixes as it does now, or use default declarations),
and then provide one additional start tag method with a boolean isDefaultNS
parameter which overrides the default behavior of the serializer. That way
you could let the serializer use prefixes as it does now, but switch to a
default namespace for certain tags where that makes sense.

Since the API is still pre-1.0 I'm hoping to get it into the standard.

The motivation is that some xml apps I deal with use their own, home grown
xml parsers that aren't namespace aware. So they will often only match the
bare tag name (prefixes throws them into a tizzy). This is most common with
J2ME midlets although I've seen some desktop apps doing the same.

Thanks

-iain 


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/LIgTpC/vN2EAA/xGHJAA/2U_rlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
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.