• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

TO parse XML having namspace using an XSLT

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i m having an xml with name space

and i m parsing "PermittedMessageType" using xsl


My question is how to parse xml having namespace by XSLT
Please help me regarding urgent
 
Sheriff
Posts: 28413
102
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Two things you need to change: First, declare and use the http://xmlns.tibco.com/bw/process/2003 namespace in your XSLT code.Second, remove the default namespace declaration (xmlns="http://www.w3schools.com") from your source XML, because XPath 1.0 interprets "/config/" in your example as "a config element not in a namespace" instead of as "a config element in the default namespace", which leads to its not finding any of your config elements.

I can't believe there's any point to the default namespace declaration in your example. But if there's a real business requirement for it, there are ugly ways to work around it.
reply
    Bookmark Topic Watch Topic
  • New Topic