You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Jo...@unisg.ch on 2003/12/02 11:01:50 UTC
[DIGESTER] prefix:namespace list
hi all,
What's the best way to retrieve the namespace declarations of an XML
element/document ? For instance in case of the document snippet below, I
would like to be able to acquire a Hashtable or something, holding the
values { (tns, http://example.com/stockquote.wsdl), (xsd1,
http://example.com/stockquote.xsd), ... }, or something like that.
<definitions name="StockQuote"
targetNamespace="http://example.com/stockquote.wsdl"
xmlns:tns="http://example.com/stockquote.wsdl"
xmlns:xsd1="http://example.com/stockquote.xsd"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
(...)
<input message="tns:GetLastTradePriceInput"/>
(...)
</definition>
I need this information, for instance to figure out the full name of
message "tns:GetLastTradePriceInput"
thanks!
Joachim
--
Joachim Peer
Research Assistant
MCM Institute, University of St. Gallen
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [DIGESTER] prefix:namespace list
Posted by Janek Bogucki <ya...@studylink.com>.
On Tuesday 02 Dec 2003 10:01 am, you wrote:
> hi all,
>
> What's the best way to retrieve the namespace declarations of an XML
> element/document ? For instance in case of the document snippet below, I
> would like to be able to acquire a Hashtable or something, holding the
> values { (tns, http://example.com/stockquote.wsdl), (xsd1,
> http://example.com/stockquote.xsd), ... }, or something like that.
>
> <definitions name="StockQuote"
> targetNamespace="http://example.com/stockquote.wsdl"
> xmlns:tns="http://example.com/stockquote.wsdl"
> xmlns:xsd1="http://example.com/stockquote.xsd"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
> (...)
> <input message="tns:GetLastTradePriceInput"/>
> (...)
> </definition>
>
>
> I need this information, for instance to figure out the full name of
> message "tns:GetLastTradePriceInput"
>
> thanks!
> Joachim
Do you have to use Digester for this? If you do not then you could use SAX2,
and the namespace information would be available to you via callbacks.
http://www.saxproject.org/?selected=namespaces
-Janek
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org