Formatting Xml Node using xsl

Nathan Brown

New Member
I beginner to xsl, having problem with Formatting node(ie UnitCost) value.I want the node UnitCost Value ie; 5.0000(4 zeroes after decimal point) to only 2 zeroes after decimal point using xsl. Xml File:\[code\] <root> <item> <link>http://localhost/Store/tabid/62/ProdID/1/Default.aspx</link> <P> <NB_Store_ProductsInfo> <ProductID>1</ProductID> <PortalID>0</PortalID> <TaxCategoryID>-1</TaxCategoryID> <Featured>false</Featured> <Archived>false</Archived> <CreatedByUser>1</CreatedByUser> <CreatedDate>2010-07-10T05:04:40.233</CreatedDate> <IsDeleted>false</IsDeleted> <ProductRef /> <Lang>en-US</Lang> <Summary /> <Description>sdcvsdcsdc&lt;br /&gt; dcsdcsdcsdcsdcsdcsdcs</Description> <Manufacturer /> <ProductName>Poster1</ProductName> <XMLData /> <ModifiedDate>2010-07-10T05:25:48.077</ModifiedDate> <SEOName /> </NB_Store_ProductsInfo> <M> <NB_Store_ModelInfo> <ModelID>1</ModelID> <ProductID>1</ProductID> <ListOrder>1</ListOrder> <UnitCost>5.0000</UnitCost> <Barcode/>....\[/code\]reading UnitCost from xml file\[code\]<xsl:value-of select="./P/M/NB_Store_ModelInfo/UnitCost" />\[/code\]any help is appericiated..
 
Back
Top