问题
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.
来源:https://stackoverflow.com/questions/26162954/how-do-i-format-xml-ampersands-for-xsl-transform