users@jaxb.java.net

Re: Setting namespace prefix for Marshaller

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Fri, 17 Jan 2003 11:08:52 -0800

> Is there some way to specify the namespace prefix the Marshaller is to
> use? I need "ifx" instead of "ns1".

We did realize this as a problem, but didn't get to solve this.

The workaround is for you to find your own XMLWriter that allows you to
set namespace prefixes as you want.

I think XMLWriter from David Megginson [1] is a public domain software
that allows you to do this, Once you find something liek it, then you
can:

    MyXMLWriter writer = new MyXMLWriter();
    ... // do some configuration with the writer

    marshaller.marshal( jaxbObject, writer );



[1] http://www.oasis-open.org/cover/megginsonXMLWriterJava01.html

regards,
--
Kohsuke KAWAGUCHI                  408-276-7063 (x17063)
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com