Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
XML
data.xmlanalysis
mappoint.webservice
msf
msxml-webrelease
netmyservices.sdk
passport.sdk
soap
soapsdk
uddi.general
uddi.programming
uddi.specification
xml
xmlsqlwebrelease
xsl
  
 
date: Tue, 20 May 2008 15:46:09 -0700,    group: microsoft.public.xml        back       


How to get the namespace URI string?   
Hello,
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@xyz.com</EmailAccount>
    </UnixEmail>
</Domain>
</p1: Domains_and_Emails>'


In the above example, how would I get the namespace string?

Thanks,
Ganesh
date: Tue, 20 May 2008 15:46:09 -0700   author:   Ganesh Muthuvelu

Re: How to get the namespace URI string?   
* 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@xyz.com</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@hoehrmann.de · 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/
date: Wed, 21 May 2008 01:02:46 +0200   author:   Bjoern Hoehrmann

Re: How to get the namespace URI string?   
U¿ytkownik "Ganesh Muthuvelu"  
napisa³ w wiadomo¶ci 
news:EED147E0-3CFD-48F2-823C-38F034F15DA5@microsoft.com...
> 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@xyz.com</EmailAccount>
>    </UnixEmail>
> </Domain>
> </p1: Domains_and_Emails>'
> In the above example, how would I get the namespace string?
> Thanks,
> Ganesh

DOM property: namespaceURI
http://www.w3schools.com/Dom/prop_node_namespaceuri.asp
-- 
td
date: Wed, 21 May 2008 12:17:22 +0200   author:   TOUDIdel

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us