qxmledit icon indicating copy to clipboard operation
qxmledit copied to clipboard

Searching by XPath doesn't work

Open reavertm opened this issue 6 years ago • 1 comments

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".

reavertm avatar Dec 11 '18 14:12 reavertm

Hello, I need the data to verify the problem.

lbellonda avatar Dec 11 '18 19:12 lbellonda

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/

franga2000 avatar Jan 04 '23 11:01 franga2000

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 avatar Jan 04 '23 16:01 lbellonda

released

lbellonda avatar Mar 30 '23 20:03 lbellonda