How do I format XML ampersands for XSL transform

2019-09-14 23:48发布

问题:

I am attempting to transform the XML I'm retrieving from an RSS feed. This links within this feed contain ampersands which, as I mentioned here, are causing the transform to bomb. (Replacing all of the "&" with "&" in the RSS's XML allows the transform to complete.)

Can anyone recommend a good approach for reformatting the RSS XML, or is there no good way to do this?

回答1:

In XML you need to use & to escape an ampersand. XSLT is XML so the same rule applies.



标签: xml xslt rss