XML parsing of ampersand character lazarus / 21-General ---------------------------------------------------------------------- c600g · 2021-11-30 16:24 I am using ReadXMLFile() to parse a string stream containing XML. One of the attributes I am parsing includes a properly escaped ampersand character ("&"). When I get the attribute value, the entity is automatically converted to "&" in the string. Is there a way to prevent this from happening? Thanks much,   Alan ---------------------------------------------------------------------- winni · 2021-11-30 18:57 Hi! Double the escaped ampersand: && Or if it is inside an URL then use the hexadecimal value: %26 Winni ---------------------------------------------------------------------- c600g · 2021-11-30 19:17 Winni, Thanks for the reply. However, I cannot control the input values to this attribute - they are sent in by a calling application over which I have no control. I simply want the attribute's value to *not* convert the "&" to "&" when I get the node's value (using TDOMNode.NodeValue). Cheers,   Alan ---------------------------------------------------------------------- SymbolicFrank · 2021-12-03 17:13 I think it should work if you include laz2_XMLRead, instead of just XMLRead. That way, ReadXMLFile has an additional parameter: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   TXMLReaderFlag = (    xrfAllowLowerThanInAttributeValue,    xrfAllowSpecialCharsInAttributeValue,    xrfAllowSpecialCharsInComments,    xrfPreserveWhiteSpace    );