XML special character export
Im having problems with special symbols when exporting XML files from Excel
(MS Office 2003).
Five special XML symbols need to be changed to this:
Left angle bracket < to <
Right angle bracket to
Ampersand & to &
Apostrophe to '
Quotation mark to "
With left angle bracket, ampersand and right angle bracket (<, &, )
everything is ok, because Excel automatically converts them to needed entity
reference, but it doesnt convert quotation mark and apostrophe (, ).
I wrote a VBA function that replaces the quotation mark with " and
apostrophe with ', but since they contain special symbol ampersand (&)
after exporting data to XML, I get something like this:
data is: text in quotes (my function converts to "text in quotes")
current XML result: "text in quotes"
but I need: "text in quotes"
OR
data is: text with apostrophes (my function converts to apostrophe's)
current XML result: text with apostrophe's
but I need: text with apostrophe's
Thank you!
|