QT:XML解析XPath

编程入门 行业动态 更新时间:2024-10-15 04:21:11
本文介绍了QT:XML解析XPath的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我将通过QT XML库解析单词文档,然后我希望使用xpath表达式来完成它。 但QT XQuery效果不佳。 这是我要解析的xml文件。

Hi, I'm going to parse the word document by QT XML library and then I hope use the xpath expressions to do it. But QT XQuery doesn't works well. Here is xml file I want to parse.

<?xml version="1.0" encoding="UTF-8"?> <Types xmlns="schemas.openxmlformats/package/2006/content-types"> <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/> <Default Extension="xml" ContentType="application/xml"/> <Default Extension="jpg" ContentType="image/jpeg"/> <Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/> <Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/> <Override PartName="/word/stylesWithEffects.xml" ContentType="application/vnd.ms-word.stylesWithEffects+xml"/> <Override PartName="/word/settings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"/> <Override PartName="/word/webSettings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml"/> <Override PartName="/word/fontTable.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"/> <Override PartName="/word/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/> <Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/> <Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/> </Types>

我按照以下方式制作了xq文件。我根据qt examples / recipes创建了它。 但是它没有解析XML文件。所以我将我的文件移动到qt examples / recipes但它也失败了。

And I made the xq file as follows. I made it according the qt examples/recipes. But it doesn't parse the XML file. So I move my files to qt examples/recipes but it also failed.

(: Get Parts From :) declare variable $inputDocument external; doc($inputDocument)/Types/Override

我很感激你的帮助...

I appreciate your helps...

推荐答案

inputDocument external; doc( inputDocument external; doc(

inputDocument )/类型/覆盖 inputDocument)/Types/Override

感谢您的帮助...

I appreciate your helps...

更多推荐

QT:XML解析XPath

本文发布于:2023-11-28 16:12:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1643078.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:QT   XML   XPath

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!