You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Laura Baño <la...@dif.um.es> on 2005/06/13 13:15:33 UTC

Retrieving original data

Hi there,

 

I’m working with Xerces J Parser with xml documents. I wonder how to
preserve the original data, so it isn’t omitted the namespaces that have
appeared before. Is there any way to get this? The matter is the next one:

 

 

<dss:VerifyRequest xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:ns="http://www.openuri.org/"
xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  …>

…

<dss:XMLData>

<prueba xmlns:ns="http://www.openuri.org/">prueba</prueba>

</dss:XMLData

</dss:VerifyRequest>

 

The problem occurs when I try to retrieve the data, I only can retrieve the
string “<prueba>prueba</prueba>”. Does anybody know how can I obtain the
full string?

 

Thanks in advance.

 

Regards,

 

Laura.


Re: Retrieving original data

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Laura,

If you're using SAX, you can instruct the parser to report namespace 
declaration attributes by turning on the 
http://xml.org/sax/features/namespace-prefixes [1] feature.

[1] http://xml.apache.org/xerces2-j/features.html#namespace-prefixes

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

Laura Baño <la...@dif.um.es> wrote on 06/13/2005 07:15:33 AM:

> Hi there,
> 
> I?m working with Xerces J Parser with xml documents. I wonder how to
> preserve the original data, so it isn?t omitted the namespaces that 
> have appeared before. Is there any way to get this? The matter is 
> the next one:
> 
> 
> <dss:VerifyRequest xmlns:ds="http://www.w3.org/2000/09/xmldsig#" 
xmlns:ns="
> http://www.openuri.org/" xmlns:saml="urn:oasis:names:tc:SAML:1.0:
> assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  ?>
> ?
> <dss:XMLData>
> <prueba xmlns:ns="http://www.openuri.org/">prueba</prueba>
> </dss:XMLData
> </dss:VerifyRequest>
> 
> The problem occurs when I try to retrieve the data, I only can 
> retrieve the string ?<prueba>prueba</prueba>?. Does anybody know how
> can I obtain the full string?
> 
> Thanks in advance.
> 
> Regards,
> 
> Laura.

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org