[thelist] Re: XML Question

Tim Kuhn Tim.Kuhn at PREMERA.com
Thu Sep 2 17:31:52 CDT 2004


Scott,
This should work, I didn't have chance to test it though. It will be ugly
and I did truncate your file but you get the idea. The xslt file should look
like this(you could pretty it up):

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" version="1.0" encoding="UTF-8"
indent="yes"/>
	<xsl:template match="/">
	<table border="1">
			<tr>
				<td>Availability</td>
				<td>GalleryPicture</td>
				<td>SiteCurrency</td>
				<td>Country</td>
				<td>EndNodeCategory</td>
			</tr>
			<tr>
				<td><xsl:value-of select="//Availability"
/></td>
				<td><xsl:value-of select="//GalleryPicture"
/></td>
				<td><xsl:value-of select="//SiteCurrency"
/></td>
				<td><xsl:value-of select="//Country" /></td>
				<td><xsl:value-of select="//EndNodeCategory"
/></td>
			</tr>
	</table>
	
	</xsl:template>
	
</xsl:stylesheet>


-----Original Message-----


I can use various readers to view the plain text.I do want to break it into 
tabular  data.
Here is the sample code. It is designed for uploading to search engine xml 
feeds.
<Product Id="4922581187">
   <Availability>Yes</Availability>
- <GalleryPicture>
- <![CDATA[ http://thumbs.ebaystatic.com/pict/4922581187.jpg
   ]]>
   </GalleryPicture>
   <SiteCurrency>$</SiteCurrency>
- <Country>
- <![CDATA[ United States
   ]]>
   </Country>
- <EndNodeCategory>
- <![CDATA[ Diamond
   ]]>
   </EndNodeCategory>
- <Url>
- <![CDATA[ 
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=4922581187&category=67726
&refid=store
   ]]>
   </Url>
- <Category>
- <![CDATA[ Jewelry & Watches:Rings:Diamond
   ]]>
   </Category>
- <Description>
- <![CDATA[ Diamond 3 band rolling ring 14 karat yellow gold 5/8 ct
   ]]>
   </Description>
   <Site>US</Site>
   <Quantity>1</Quantity>
- <Caption>
- <![CDATA[ "The finest jewelry at discount prices" We have over 45 years 
of jewelry manufacturing and retail experience. Looking at all the diamond 
"bargains" on-line I realized that I could give real bargains, with real 
quality, without the often confusing and misleading information given by 
some dealers. Three Band Diamond Rolling Ring 14 karat yellow gold 5/8 
carat total weight Natural Diamonds from mother earth! Dazzling 5/8 ct. 
t.w. (.62ct.t.w.)Round cut genuine diamonds. CUT: Round COLOR: G/H CLARIT
   ]]>
   </Caption>
   <EndTime>12-29-2004 03:17:36</EndTime>
   <Orderable>Yes</Orderable>
- <Pricing>
   <BasePrice>$2,319.00</BasePrice>
   </Pricing>
   </Product>
Scott Wolpow







More information about the thelist mailing list