Thanks Yana for your response. Closing Tag of coc:OBJECT_ID was there.. For 
better readability I aligned it ..  I will try with cursor to modify the 
document..  I just tried to substitute the namespaces.. but it did not work.. 
Any idea why following code is not working ?
 
    XmlOptions opts = new XmlOptions();
    StringWriter writer = new StringWriter();
 
    HashMap m = new HashMap();
    m.put("http://testdomain/cocommon <http://testdomain/cocommon> ","");  // 
replace with blank
    m.put("http://testdomian/coindividual <http://testdomian/coindividual> 
",""); // replace with blank
    opts.setLoadSubstituteNamespaces(m);
 
    xmlGeoDoc.save(writer,opts); // xmlGeoDoc is the document obj
 

======= (XML)

 

<coin:GEOCODE xmlns:coin="http://testdomain/coindividual 
<http://testdomain/coindividual> ">
    <coin:INPUTS>
        <coin:EXTERNAL_ID>18285</coin:EXTERNAL_ID>
        <coin:ACTUAL_LOGICAL>false</coin:ACTUAL_LOGICAL>
    </coin:INPUTS>
    <coin:OUTPUTS>
          <coc:OBJECT_ID xmlns:coc="http://testdomain/cocommon";>

            165302

          </coc:OBJECT_ID>
    </coin:OUTPUTS>
</coin:GEOCODE>

 
Thanks
Kiran
-------------------------------------------------
Ph: 312 742 9630
Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 

________________________________

From: Yana Kadiyska [mailto:[EMAIL PROTECTED]
Sent: Wed 6/29/2005 12:33 PM
To: user@xmlbeans.apache.org
Subject: RE: suppress namespaces



Is that your whole instance? I don't see a closing tag for the 
coc:OBJECT_ID...the option you're trying to uses the most commonly used URI as 
the default NS, but it has to pick one of them for the purpose and coindividual 
seems the right choice here .

If it is imperative that you loose prefixes/namespaces you can use the cursor 
to walk your document and modify it...I think that's the best you can do...

 

--Yana

 

________________________________

From: Kiran Kumar [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 29, 2005 6:30 AM
To: user@xmlbeans.apache.org
Subject: FW: suppress namespaces

 

Hello, If anybody has any idea on my question, please throw some light .... 
Appreciate your time and help..

 

Thanks

Kiran

________________________________

From: Kiran Kumar [mailto:[EMAIL PROTECTED]
Sent: Tue 6/28/2005 12:35 PM
To: user@xmlbeans.apache.org
Subject: suppress namespaces

Hello, I am using XmlBeans to generate the XML response. It generates the 
following response.. But I want to suppress the namespaces in the response. If 
you observe closely there are 2 namespaces (/coindividual and other one 
/cocommon) .. If I use XmlOptions.setUseDefaultNamespace(), it is suppressing 
only for "/coindividual". Is there any way I can suppress all the namespaces ? 
[ Reason I want to suppress namespaces is, I have few client applications which 
does string manipulation on XML, they dont use parsers.. its a different story ]

 

<coin:GEOCODE xmlns:coin="http://testdomain/coindividual 
<http://testdomain/coindividual> ">
    <coin:INPUTS>
        <coin:EXTERNAL_ID>18285</coin:EXTERNAL_ID>
        <coin:ACTUAL_LOGICAL>false</coin:ACTUAL_LOGICAL>
    </coin:INPUTS>
    <coin:OUTPUTS>
        <coc:OBJECT_ID 
xmlns:coc="165302http://testdomain/cocommon";>165302</coc:OBJECT_ID 
<http://testdomain/cocommon> >
    </coin:OUTPUTS>
</coin:GEOCODE>

 

Thanks

Kiran

<mailto:[EMAIL PROTECTED]>  

------------------------------------------------

This e-mail, and any attachments thereto, is confidential and is intended only 
for the individual(s) named.  If you are not the intended recipient, please let 
us know by e-mail reply and delete it from your system; do not copy/save this 
e-mail or disclose its contents to anyone.  E-mail transmissions cannot be 
guaranteed to be secure or error-free as the transmission could be interrupted, 
corrupted, lost, destroyed, altered, arrive late or contain viruses.  
ObjectWave does not accept liability for any errors or omissions in the 
contents of this e-mail which arise as a result of e-mail transmission.  The 
views expressed in this e-mail do not necessarily reflect those of ObjectWave 
or its affiliates.

------------------------------------------------

------------------------------------------------

This e-mail, and any attachments thereto, is confidential and is intended only 
for the individual(s) named.  If you are not the intended recipient, please let 
us know by e-mail reply and delete it from your system; do not copy/save this 
e-mail or disclose its contents to anyone.  E-mail transmissions cannot be 
guaranteed to be secure or error-free as the transmission could be interrupted, 
corrupted, lost, destroyed, altered, arrive late or contain viruses.  
ObjectWave does not accept liability for any errors or omissions in the 
contents of this e-mail which arise as a result of e-mail transmission.  The 
views expressed in this e-mail do not necessarily reflect those of ObjectWave 
or its affiliates.

------------------------------------------------

<<winmail.dat>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to