Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - How to get the namespace URI string? [Thread Next] Re: How to get the namespace URI string?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/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
