Xpath & namespaces, How to use namespace in xpath?

Roseanne Zhang

You need to understand how namespace and its prefix works to understand your problem.

  • All tags w/o prefix in your XML belong to the default namespace "http://www.imsproject.org/xsd/imscp_rootv1p1p2"
  • Prefix, such as "adlcp" must be defined in your xpath context before using.
  • If you're using XSLT, it must be defined there. Otherwise, you need to use namespace-uri() and local-name() functions.
  • A simple example can be found here Q. How to handle attributes with namespace in xpath?. Give it a try!
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact