[jdom-interest] Namespace prefix

Jan Sundqvist jansu at medicinsklogik.se
Fri Oct 13 02:30:20 PDT 2000


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?

/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/





More information about the jdom-interest mailing list