Connecting Tech Pros Worldwide Help | Site Map

extract namespace from an xml file

Newbie
 
Join Date: Jul 2008
Posts: 19
#1: Aug 13 '08
Hello ,
is there any possibility where i can extract the namespace (http://schemas.microsoft.com/project)from the xml file.


ie for eg
<?xml version="1.0" ?>
- <Project xmlns="http://schemas.microsoft.com/project">
<Name>test.xml</Name>
<Title>MS-Project2000- Kalender</Title>
<CreationDate>1998-09-10T13:43:00</CreationDate>


thank you in advance
Moderator
 
Join Date: Mar 2006
Posts: 1,103
#2: Aug 19 '08

re: extract namespace from an xml file


What tool/language are you using?

eg: if text searching, you could search for xmlns=" and then take the text til the next "

If xslt, use the namespace axis:
<xsl:value-of select="namespace::*"/>
http://www.zvon.org/xxl/XSLTreferenc...namespace.html
Reply