We've a result from a 3rd party webservice that doesn't filter as much as we'd like.
The result is in this form;
<VehicleWSDataPackage><Vehicles><Vehicle><VehicleType><ID>0</ID><Name>Car</Name></VehicleType><id>1234><name>blah</name></Vehicle></Vehicles></VehicleWSDataPackage>
We need to be able to filter the results above (there's a list of Vehicle elements in the Vehicles element) by the VehicleType where the ID value is a value that we can specify. In XPath this would be straight forward but I'd like to take the Linq2XML approach. I know I could do it by iterating through the document but that seems a bit daft to rebuild it that way when I presume there's a single method that can be used to do it.
c# or vb.net, don't mind ;-)
Cheers Andy
No comments:
Post a Comment