XML验证错误 [英] XML Validation Error
本文介绍了XML验证错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的团队
我试图解决XML错误,但我没有得到如何解决请帮助我
XML请求
Dear Team
I tried to resolve the XML Error but i am not getting how to resolve please help me
XML Request
<?xml version="1.0" encoding="UTF-8"?>
<OTA_TourSearchRQ xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05/OTA_TourSearchRQ.xsd"EchoToken=ABC001 TransactionIdentifier=1 TimeStamp=2014-07-30T16:57:00 Version=1.000 Target=Test"><POS><Source><AgentSine>ABC</AgentSine><AgentDutyCode>=DELTAXml</AgentDutyCode><RequestorID> <Type>5</Type> <ID>DELTAXml</ID></RequestorID></Source></POS><SearchCriteria><DestinationPref> <RegionCode>5473</RegionCode></DestinationPref><SearchDateRange> <Start>2014-08-15</Start> <End>2014-08-16</End></SearchDateRange><CustomerCounts> <Code>10</Code> <Quantity>10</Quantity> <Age></Age></CustomerCounts></SearchCriteria></OTA_TourSearchRQ>
when I validate the XML, getting error as below
Errors in the XML document:
1: 156 Element type "OTA_TourSearchRQ" must be followed by either attribute specifications, ">" or "/>".
please help me to resolve
Thanks with Advance
Sheethal
推荐答案
试试这个
Try this
<OTA_TourSearchRQ
xmlns="http://www.opentravel.org/OTA/2003/05"
xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance"
xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05/OTA_TourSearchRQ.xsd"
EchoToken="ABC001"
TransactionIdentifier="1"
TimeStamp="2014-07-30T16:57:00"
Version="1.000 "
Target="Test">
<POS>
<Source>
<AgentSine>ABC</AgentSine>
<AgentDutyCode>=DELTAXml</AgentDutyCode>
<RequestorID>
<Type>5</Type> <ID>DELTAXml</ID>
</RequestorID>
</Source>
</POS>
<SearchCriteria>
<DestinationPref>
<RegionCode>5473</RegionCode>
</DestinationPref>
<SearchDateRange>
<Start>2014-08-15</Start>
<End>2014-08-16</End>
</SearchDateRange>
<CustomerCounts>
<Code>10</Code>
<Quantity>10</Quantity>
<Age></Age>
</CustomerCounts>
</SearchCriteria>
</OTA_TourSearchRQ>
这篇关于XML验证错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文