I am parsing XML into a table using xpath and having issues with regards to the HTML encoded characters, it seems that some escaped HTML codes are being converted but others are not.
Prior to injection into XML the raw data is : !"£$%^&*()<>
The raw XML is as follows : <PLAN>!"£$%^&*()<></PLAN>
When I run this through xpath as suggested in the post below I find that some codes are converted and some aren't
select (xpath('/PLAN/text()', ('<PLAN>!"£$%^&*()<></PLAN>')::xml))[1]::text
The result is this : !"£$%^&*()<>
It seems the &, < and > chars are not being handled but quote and GBP symbols are OK, when I run the query in the post below the "magic" and "toaster" works but I still get "s&witch"
I am using PostgreSQL 9.3 on windows but see this behaivour on 9.1 on linux.
Does anyone have any ideas what the problem is here or do you think it's some kind of bug ?