[xsd-users] Retrieving namespace map from parsed docs

Russ Loucks rjl at third-monday.com
Thu Dec 2 15:00:15 EST 2010


On 12/02/2010 02:04 PM, Boris Kolpackov wrote:
> Hi Russ,
>
> Russ Loucks<rjl at third-monday.com>  writes:
>
>> 1st question:  Can I retrieve the namespace map from the parsed XML
>> documents?
> You can, but it will require a bit of work. The namespace-prefix
> (and namespace-schema) mapping is not preserved in the object
> model. But it is available in the raw DOM representation. So
> what you can do is break the parsing process into two stages:
> XML-to-DOM and DOM-to-object model. In between the two stages
> you can extract the namespace mapping attributes from the DOM
> document using the Xerces-C++ API. For code that shows how to
> set up XML-to-DOM parsing, see, for instance, the 'messaging'
> example.
>
> Boris
Thanks much for the quick response.  I'll take a look at that.
r



More information about the xsd-users mailing list