【发布时间】:2016-11-22 10:19:15
【问题描述】:
我正在使用 xslt 从以下 xslt 中提取数据。无论如何要剥离CData。目前它在提取时也包含 CData。
<Product>
<ExternalId><![CData[55037]]></ExternalId>
<Name><![CData[Reindeer Booties]]></Name>
<Description><![CData[Everybody say, "Aww!" Prepare for maximum cuteness when these plush reindeer booties are unwrapped from their special box. Faux fur provides plenty of warmth for tiny toes and softness for delicate skin. A pompom nose with 3D ears and antlers are enough to bring out the festive spirit in anyone.]]></Description>
<Brand>XYZ</Brand>
<CategoryExternalId>1_15_1</CategoryExternalId>
<ProductPageUrl><![CData[http://www.xyz.co.uk/baby-accessories/SE037/baby-reindeer-booties]]></ProductPageUrl>
<ImageUrl><![CData[http://www.xyzimages.com/images/product/16S_550.jpg]]></ImageUrl>
<SwatchImageUrl><![CData[]]></SwatchImageUrl>
<Price>84.8000</Price>
<Wasprice>154.9500</Wasprice>
<ManufacturerPartNumber></ManufacturerPartNumber>
<EAN></EAN>
<Colours><![CData[blue-pink]]</Colours>
</Product>
我期待以下输出
<Product>
<ExternalId>55037</ExternalId>
<Name>Reindeer Booties></Name>
<Description>Everybody say, "Aww!" Prepare for maximum cuteness when these plush reindeer booties are unwrapped from their special box. Faux fur provides plenty of warmth for tiny toes and softness for delicate skin. A pompom nose with 3D ears and antlers are enough to bring out the festive spirit in anyone.</Description>
<Brand>XYZ</Brand>
<CategoryExternalId>1_15_1</CategoryExternalId>
<ProductPageUrl>http://www.xyz.co.uk/baby-accessories/SE037/baby-reindeer-booties</ProductPageUrl>
<ImageUrl>http://www.xyzimages.com/images/product/16S_550.jpg</ImageUrl>
<SwatchImageUrl></SwatchImageUrl>
<Price>84.8000</Price>
<Wasprice>154.9500</Wasprice>
<ManufacturerPartNumber></ManufacturerPartNumber>
<EAN></EAN>
<Colours>blue-pink</Colours>
</Product>
【问题讨论】:
-
您能展示一下您的 xslt(相关部分)吗?