Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: How to get the namespace URI string?

From: Bjoern Hoehrmann <bjoern@---------.-->
To: NULL
Date: 5/21/2008 1:03:00 AM

* Ganesh Muthuvelu wrote in microsoft.public.xml:
>I have a XML as below:
>
>declare @doc2 xml
>SET @doc2 = '<?xml version="1.0" ?> 
><p1: Domains_and_Emails xmlns:p1="LDAP">
>  <Domain>
>    <UnixEmail>
>      <uid>info</uid>
>      <Password>xyz</Password>
>      <EmailAccount>info@x...</EmailAccount>
>    </UnixEmail>
></Domain>
></p1: Domains_and_Emails>'
>
>
>In the above example, how would I get the namespace string?

Using what, exactly? Are you using XPath, XQuery, .NET's XmlDocument, a
SAX2 parser in Java, libxml2 in C, ...? Usually the environment provides
some method, like a namespace-uri() getter in some fashion, to get the
namespace from the p1:Domains_and_Emails Element node or event, or some
function to look up the namespace uri that corresponds to a prefix, e.g.
the DOM has lookupNamespaceURI as a method on all Nodes.
-- 
Björn Höhrmann · mailto:bjoern@h... · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent