• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 224
  • Last Modified:

How do i find the xmlns ?

I am trying to find this in some atom feeds(similiar to rss feeds):

xmlns=\"http://www.w3.org/2005/Atom\"

however it doesnt seem to be in the same spot always so how do i use xml methods to find it?
 Assume I have myXmlDoc object already.

c#

0
joshuadavidlee
Asked:
joshuadavidlee
1 Solution
 
bruintjeCommented:
Hi joshuadavidlee,
----------

you could look into the XmlNamespaceManager, it has some methods like LookupNamespace to get the namespace in a specific prefix, i didn't get it to work right here yet

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemXmlXmlNamespaceManagerClassLookupNamespaceTopic.asp

----------
bruintje
share what you know, learn what you don't
0
 
Carl TawnSystems and Integration DeveloperCommented:
You could try XPath like:

    //@*[name()='xmlns']
0
 
pgloorCommented:
Take a look at http://www.kbcafe.com/rss/AtomApi.0.3.1.xsd and in this file at the line with:

xmlns:atom="http://purl.org/atom/ns#" xmlns:xs="http://www.w3.org/2001/XMLSchema"

This is the latest version I know about, but I'm not sure.





0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now