lbellonda / qxmledit

QXmlEdit XML editor. Downloads: https://sourceforge.net/projects/qxmledit/files
http://qxmledit.org
Other
160 stars 46 forks source link

Searching by XPath doesn't work #56

Closed reavertm closed 1 year ago

reavertm commented 5 years ago

The same query works well in 'xmlint -xpath' on the same XML file, while in QXmlEdit it always fails with:

"No variable with name root. exists : location: 1-33 http://www.w3.org/2005/xqt-errors#XPST0008"

I think QXmlEdit should define/provide all the namespaces so that search by xpath "just works".

lbellonda commented 5 years ago

Hello, I need the data to verify the problem.

franga2000 commented 1 year ago

I just ran into this issue on this file: int_promet_bus_postaje(1).xml.txt

Using v1.9.17, any query starting with .// (for example .//public:int_promet_bus_postaje) fails with: image and image

The same query works using lxml (Python) and http://xpather.com/

lbellonda commented 1 year ago

The dot is not interpreted as expression, but as part of the name of an internal variable. Since the root of the XML is already pointing to the current context, at the moment you can leave out the '.' while I am working on this.

lbellonda commented 1 year ago

released