[jdom-interest] Namespace prefix

Brett McLaughlin brett.mclaughlin at lutris.com
Fri Oct 13 13:09:48 PDT 2000


Jan Sundqvist wrote:

> Hi,
> 
> I am currently using the beta 4, but from the documentation I think my
> problem exists in beta 5 too.
> 
> I have a XML document looking something like this:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <EHCM xmlns="http://www.medicinsklogik.se/interfaces/ehcm_1.xml">
> <Body>
>     <REPORT_REQUEST
> xmlns="http://www.medicinsklogik.se/interfaces/report_request_1.xml">
>         <MSG_PARTS>
>             <CUST_REFID>1234</CUST_REFID>
>         </MSG_PARTS>
>     </REPORT_REQUEST>
> </Body>
> </EHCM>
> 
> If I read this into a JDOM tree and then uses XMLOutputter to recreate my
> document the output will look like this:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <ehcm:EHCM
> xmlns:repreq="http://www.medicinsklogik.se/interfaces/report_request_1.xml"
> xmlns:ehcm="http://www.medicinsklogik.se/interfaces/ehcm_1.xml">
> <ehcm:Body>
>     <repreq:REPORT_REQUEST>
>         <repreq:MSG_PARTS>
>            <repreq:CUST_REFID>1234</repreq:CUST_REFID>
>         </repreq:MSG_PARTS>
>     </repreq:REPORT_REQUEST>
> </ehcm:Body>
> </ehcm:EHCM>
> 
> I don't want namespace prefix on every tag.
> How can I produce a document from JDOM that looks like my original document?
> If I can't, will it be possible in future releases?


I'm not sure that this is correct. Upgrade to beta 5, or even the latest 
from CVS, and try it. I rthink you'll find that it works. Let us know if 
it does not.

-Brett

> 
> /Jan
> 
> ---------------------------------------------------
> Jan Sundqvist
> Medicinsk Logik AB
> Seatons allé 3B S-443 32 Lerum, Sweden
> Support: Phone: +46 13 473 25 90, Fax: +46 13 473 25 99
> Phone: +46 302 516 90
> Mobile: +46 70 946 67 27
> mailto:jansu at medicinsklogik.se
> http://www.medicinsklogik.se/
> 
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
> 
> 






More information about the jdom-interest mailing list