0
<ns0:EnrollmentMSCSV01 xmlns:ns0="http://**************">
<MemberRecords>
<MemberRecord>
<BatchSeqNo>BatchSeqNo_0</BatchSeqNo>
<TransactionType>TransactionType_0</TransactionType>
<SvcMemberID>SvcMemberID_0</SvcMemberID>
我有我的架构和我的编排项目的XML结构我想访问事务类型并执行一些步骤。 我正在使用此XPath表达式来检索事务类型。但gettting无效的令牌错误。Xpath给出的错误有无效的令牌
/*[local-name()='EnrollmentSV01' and namespace-uri()='http://intervalintl.com/shell']
/*[local-name()='MemberRecords' and namespace-uri()='']
/*[local-name()='MemberRecord' and namespace-uri()='']
/*[local-name()='TransactionType' and namespace-uri()='']
请让我知道正确的XPath检索TransactionType
什么_exactly_是错误消息,您使用的是什么语言或工具?乍一看,我看不到任何关于该XPath表达式的任何无效(尽管它比需要非常长,因为非名称空间元素可以简单地称为“MemberRecords/MemberRecord/TransactionType”)。 – 2014-10-09 15:58:27
我第二伊恩。另外,如果你在XML中替换你的URI,那么在你的XPath中做同样的事情可能是一个好主意...... – dirkk 2014-10-09 15:59:57
当然,因为它表达不会匹配任何东西,因为你有'EnrollmentSV01 '在文档中的XPath和'EnrollmentMSCSV01'中,但不应该导致错误。 – 2014-10-09 16:06:51