选择xml节点无法选择特定数据

时间:2018-05-02 14:11:18

标签: asp-classic

<B:CreditVehicle>
<B:Model>Accord Sedan</B:Model>
<B:ModelYear>2014</B:ModelYear>
<B:ModelDescription>CR2F3EEW</B:ModelDescription>
<B:Make>Honda</B:Make>
<B:SaleClass>Used</B:SaleClass>
<B:Condition>CLEAN</B:Condition>
<B:CertifiedPreownedInd>0</B:CertifiedPreownedInd>
<B:VehicleNote>4dr I4 CVT LX</B:VehicleNote>
<B:VIN>1HGCR2F37EA078469</B:VIN>
<B:DeliveryMileage uom="M">101550</B:DeliveryMileage>
<B:VehicleDemoInd>0</B:VehicleDemoInd>
<B:Pricing>
<B:VehiclePrice currency="USD">11100</B:VehiclePrice>
<B:VehiclePricingType>MSRP</B:VehiclePricingType>
</B:Pricing>
<B:Pricing>
<B:VehiclePrice currency="USD">12149</B:VehiclePrice>
<B:VehiclePricingType>Selling Price</B:VehiclePricingType>
</B:Pricing>
<B:Pricing>
<B:VehiclePrice currency="USD">8925</B:VehiclePrice>
<B:VehiclePricingType>Wholesale Price</B:VehiclePricingType>
</B:Pricing>
<B:CollateralType>1</B:CollateralType>
<B:AuctionInd>0</B:AuctionInd>
<B:VehicleUse>7</B:VehicleUse>
</B:CreditVehicle>

在上面的XML文件中,我尝试选择“批发价格”值“8925”。我试图通过选择一个节点来做到这一点,但我无法做到。

这就是我想要做的事情:

Set Node = xmlDoc.documentElement.selectSingleNode("D:Body/B:ProcessCreditApplication/B:DataArea/B:CreditApplication/B:Detail/B:CreditVehicle/B:Pricing[@VehiclePricingType='Wholesale Price']/B:VehiclePrice")

我已经能够使用“choicesinglenode”选项获取值,但是这种XML结构可能无法覆盖。

任何人都有想法或经验以简单的方式做到这一点?

0 个答案:

没有答案