• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
Marshal
Posts: 28177
95
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.
 
Let's go to the waterfront with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic