But why does it surprise you that you might loose some things? You parse it for 
a reason I suppose. Now, I do not know how your webServiceHandler looks like, 
but if it has something like:

public void startPrefixMapping(String prefix, String uri)
                        throws SAXException {
                // no prefix
        }

        public void endPrefixMapping(String prefix) throws SAXException {
                // no prefix
        }

then yes, you will loose the namespaces. I am not sure about your 
webservicehandler, but perhaps this helps you out a little

Ard




oh, sorry, bad copy paste. 

I receive somethig like 
<?xml version="1.0" encoding="UTF-8"?><Envelope 
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance";><data><Driver><id 
xsi:nil="false">805330</id>........</Driver></data></Envelope> 

but after i send it through the parser, i get 
<Envelope ><data><Driver><id 
xsi:nil="false">805330</id>........</Driver></data></Envelope> 


I use my own webservicehandler witch uses org.apache.cocoon.xml.dom.DOMBuilder 





"Ard Schrijvers" <[EMAIL PROTECTED]> 
10/01/2007 10:59 Please respond to
users@cocoon.apache.org

To<users@cocoon.apache.org> 
cc
SubjectRE: namespace removed from xml







what you wrote you got back is not valid xml??

the parser changed also Envelope into SofEnvelope? And driver into MWSDriver?

Anyway, what is the webServiceHandler, one of your own? There you define all 
the handlers, so also start prefix mappings and stuff, if i recall correctly

Ard


Hello, 

I use 
SAXParser parser    (org.apache.excalibur.xml.sax.SAXParser) 
parser.parse(input, webServiceHandler); 

to treat the info I got from webservices in xml format. 
I receive somethig like 
<?xml version="1.0" encoding="UTF-8"?><Envelope 
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance";><data><Driver><id 
xsi:nil="false">805330</id>........</Driver></data></Envelope> 

but after i send it through the parser, i get 
<SofEnvelope ><data><MWSDriver><id 
xsi:nil="false">805330</id>........</Driver></data></Envelope>

so the xmlns namsespace definition has disappeared. 

What can I do to  prevent this? I read something about 
parser.setNamespaceAware(true); but that is not a valid method of the parser I 
use. 


Greetings, 


Roel Croonenberghs

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

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

Reply via email to