• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic