• 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

Remove prefix when building a Document

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a tool which uses xpath to check if certain elements exists in documents. The problem i have is that XPathAPI which i use does not understand namespaces and prefix and therefore fails to find nodes with prefix.

So.. how do i remove prefix when building a Document?



at the moment i build a Document with:


[ December 13, 2005: Message edited by: Alex Anderson ]
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to our XML forum.
 
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Alex Anderson:
I have a tool which uses xpath to check if certain elements exists in documents. The problem i have is that XPathAPI which i use does not understand namespaces and prefix and therefore fails to find nodes with prefix.

So.. how do i remove prefix when building a Document?



at the moment i build a Document with:



[ December 13, 2005: Message edited by: Alex Anderson ]



This thread may answer your question XPath and namespaces. look how factory.setNameSpaceAware(false) changes the behaviour
 
I will open the floodgates of his own worst nightmare! All in a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic