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

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: 28327
96
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.
 
Without subsidies, chem-ag food costs four times more than organic. Or this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic