伙计我在字符串中有我的xml,我试图将xml加载到字符串中,它显示我错误。我正在尝试将字符串中的xml文档加载到xmldocument对象,但它显示以下错误:
'='字符,十六进制值0x3D,不能包含在名称中。第10行,第27位。
我的xml是一个字符串变量,如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<OTA_AirLowFareSearchRQ EchoToken="0" SequenceNmbr="0" TransactionIdentifier="0" AvailableFlightsOnly="" DirectFlightsOnly="" xmlns="http://www.opentravel.org/OTA/2003/05">
<POS xmlns="http://www.opentravel.org/OTA/2003/05">
<Source AgentSine="" PseudoCityCode="" TerminalID="1">
<RequestorID ID="AFFILIATE"/>
</Source>
<YatraRequests>
<YatraRequestDoNotHitCache="false" DoNotCache="false" YatraRequestTypeCode="SMPA" Description="" MidOfficeAgentID="28737" AffiliateID="TRAVELPARTNER" />
</YatraRequests>
</POS>
<TravelerInfoSummary>
<AirTravelerAvail>
<PassengerTypeQuantity Code="ADT" Quantity="1"/>
<PassengerTypeQuantity Code="CHD" Quantity="2"/>
<PassengerTypeQuantity Code="INF" Quantity="1"/>
</AirTravelerAvail>
</TravelerInfoSummary>
<SpecificFlightInfo>
<Airline Code=""/>
</SpecificFlightInfo>
<OriginDestinationInformation>
<DepartureDateTime>30/01/2013</DepartureDateTime>
<OriginLocation CodeContext="IATA" LocationCode=BLR>BLR</OriginLocation>
<DestinationLocation CodeContext="IATA" LocationCode=DEL>DEL</DestinationLocation>
</OriginDestinationInformation>
<TravelPreferences>
<VendorPref Code="SG"/>
<VendorPref Code="DN"/>
<CabinPref Cabin=Economy/>
</TravelPreferences>
</OTA_AirLowFareSearchRQ>
</soapenv:Body>
</soapenv:Envelope>
答案 0 :(得分:1)
由于错误明确指出,您的XML无效:
<YatraRequestDoNotHitCache="false"