0

みんな私は文字列にxmlを持っていて、xmlを文字列にロードしようとしていますが、エラーが表示されています。文字列内の xml ドキュメントを xmldocument オブジェクトに読み込もうとしていますが、次のエラーが表示されます。

「=」文字 (16 進値 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>
4

1 に答える 1

1

エラーが明確に示すように、XML は無効です。

<YatraRequestDoNotHitCache="false" 
于 2013-01-18T18:05:44.553 に答える