Grasping for straws here, a newbi to spry and xml. I am
trying to display numbers from an xml file. I have a number ei.
25450 which I need to display as $25,450.00.
Question #1 Do I format this in the xpath statement? Or do I
add a xsl file?? Below, please find a sample form the xml file.
<Price> is the element I need to format. As
Question #2 how do I get just the first jpg from the
<Image> node, (order = “1”). Is this a separate
dataset?
My xpath is var dstoys = new
Spry.Data.XMLDataSet("../images/rvusa/database_export.xml",
"Inventory/Dealer/Location/Units/Unit[Type ='Toy Hauler']");
<Inventory>
<Dealer>
<ID>422</ID>
<Name><![CDATA[client]]></Name>
<Location>
<ID>458</ID>
<Address>11572 Road</Address>
<City>Any Town</City>
<State>WA</State>
<ZipCode>98000</ZipCode>
<Phone>123-123-1234</Phone>
<Units>
<Unit>
<ID>482252</ID>
<Type><![CDATA[Park Model]]></Type>
<Condition><![CDATA[New]]></Condition>
<Stock_Number><![CDATA[1865]]></Stock_Number>
<Year><![CDATA[2008]]></Year>
<Manufacturer><![CDATA[Kropf]]></Manufacturer>
<Model><![CDATA[SESRLP]]></Model>
<Length>36</Length>
<MSRP>0</MSRP>
<Price>61545</Price>
<Sale_Price>0</Sale_Price>
<Description><![CDATA[Large bathroom with walk-in
laundry room. Front living room, nice entertainment center. All
residential appliances, 8" I-beam chassis with full outriggers, 2x4
sidewall framing 16" on-center. 50 year vinyl siding, fiberglass
insulation R-22 in the roof, R-11 in the sidewalls and
floor.]]></Description>
<Chassis><![CDATA[]]></Chassis>
<Engine_Manufacturer><![CDATA[]]></Engine_Manufacturer>
<Engine_Model><![CDATA[]]></Engine_Model>
<Fuel_Type><![CDATA[]]></Fuel_Type>
<Interior_Color><![CDATA[Rustic]]></Interior_Color>
<Exterior_Color><![CDATA[Tan]]></Exterior_Color>
<Sleep_Capacity />
<Water_Capacity />
<Num_Air_Conditioners>1</Num_Air_Conditioners>
<Mileage />
<Trailer_Weight />
<Num_Slideouts>0</Num_Slideouts>
<VIN><![CDATA[]]></VIN>
<Is_Special><![CDATA[False]]></Is_Special>
<Is_Sold><![CDATA[False]]></Is_Sold>
<Is_Consignment><![CDATA[False]]></Is_Consignment>
<Is_New_Arrival><![CDATA[False]]></Is_New_Arrival>
<Is_On_Deposit><![CDATA[False]]></Is_On_Deposit>
<Is_On_order><![CDATA[False]]></Is_On_order>
<Images>
<Image order="1"><![CDATA[
http://mydomain.com/images/482252_1.jpg
<Image order="2"><![CDATA[
http://mydomain.com/images/482252_2.jpg
<Image order="3"><![CDATA[
http://mydomain.com/images/482252_3.jpg
<Image