也许有人可以在这里帮助我,我希望使用QBWC从Quickbooks获取所有工资单详情,但我收到0x80040400错误说QuickBooks found an error when parsing the provided XML text stream.
当我进行其他查询时,它只适用于此查询,我收到此错误。
以下是我发送给QB的XML:
<?qbxml version="7.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<PayrollDetailReportQueryRq>
<PayrollDetailReportType>PayrollTransactionDetail</PayrollDetailReportType>
<DisplayReport>true</DisplayReport>
<ReportDateMacro>All</ReportDateMacro>
<ReportClassFilter>
<FullName>Name</FullName>
</ReportClassFilter>
<ReportModifiedDateRangeMacro>All</ReportModifiedDateRangeMacro>
<ReportDetailLevelFilter>All</ReportDetailLevelFilter> <!-- opt, v3.0 -->
</PayrollDetailReportQueryRq>
</QBXMLEvents>
</QBXML>
答案 0 :(得分:1)
您需要包含xml版本信息,即使验证工具在没有它的情况下验证文件也是如此。这是我用来生成报告的代码:
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="7.0"?>
<QBXML>
<QBXMLMsgsRq onError = "stopOnError">
<PayrollDetailReportQueryRq>
<PayrollDetailReportType>PayrollTransactionDetail</PayrollDetailReportType>
<DisplayReport>true</DisplayReport>
<ReportDateMacro>All</ReportDateMacro>
<ReportClassFilter>
<FullName>Name</FullName>
</ReportClassFilter>
<ReportModifiedDateRangeMacro>All</ReportModifiedDateRangeMacro>
<ReportDetailLevelFilter>All</ReportDetailLevelFilter>
</PayrollDetailReportQueryRq>
</QBXMLMsgsRq>
</QBXML>
答案 1 :(得分:0)
您是否尝试过XML Validator并查看它的内容?
Line: 14
LinePos: 5
Src Text: </QBXMLEvents>
Reason: End tag 'QBXMLEvents' does not match the start tag 'QBXMLMsgsRq'.
您的文档无效XML。修复结束标记<QBXMLEvents>
以匹配起始标记QBXMLMsgsRq
。