How does one bind namespace prefixes when using QXmlQuery (Qt XQuery)?

前端 未结 1 1306
清歌不尽
清歌不尽 2021-01-22 03:14

I\'m attempting to use QXmlQuery to execute an XQuery expression against a document with a declared default namespace.

For discussion:



        
相关标签:
1条回答
  • 2021-01-22 03:51

    I believe if you would change your query to

    ...
    QXmlResultItems items;
    query.setQuery("declare default element namespace \"http://namespace.com/ns1\"; /root");
    ...
    

    it should return the data.

    hope this helps, regards

    0 讨论(0)
提交回复
热议问题