From aa29f0463ef35f69fdf4b0caeaab1243be564767 Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Fri, 27 Jun 2014 07:53:21 +0000 Subject: [PATCH] Added: GetValidXMLText wrapper for string elements --- Units/DelphiXMLDataBindingResources.pas | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Units/DelphiXMLDataBindingResources.pas b/Units/DelphiXMLDataBindingResources.pas index 7d33faa..fffaa7e 100644 --- a/Units/DelphiXMLDataBindingResources.pas +++ b/Units/DelphiXMLDataBindingResources.pas @@ -398,7 +398,7 @@ const { tcDateTime } True, { tcDate } True, { tcTime } True, - { tcString } False, + { tcString } True, { tcBase64 } True, { tcNone } False ); @@ -499,7 +499,7 @@ const { tcDateTime } ' ChildNodes[''%:s''].NodeValue := DateTimeToXML(%:s, xdtDateTime);', { tcDate } ' ChildNodes[''%:s''].NodeValue := DateTimeToXML(%:s, xdtDate);', { tcTime } ' ChildNodes[''%:s''].NodeValue := DateTimeToXML(%:s, xdtTime);', - { tcString } '', + { tcString } ' ChildNodes[''%:s''].NodeValue := GetValidXMLText(%:s);', { tcBase64 } ' ChildNodes[''%:s''].NodeValue := Base64Encode(%:s);', { tcNode } ' ChildNodes[''%:s''] := %:s;' ), @@ -511,7 +511,7 @@ const { tcDateTime } ' ChildNodesNS[''%:s'', ''%:s''].NodeValue := DateTimeToXML(%:s, xdtDateTime);', { tcDate } ' ChildNodesNS[''%:s'', ''%:s''].NodeValue := DateTimeToXML(%:s, xdtDate);', { tcTime } ' ChildNodesNS[''%:s'', ''%:s''].NodeValue := DateTimeToXML(%:s, xdtTime);', - { tcString } '', + { tcString } ' ChildNodesNS[''%:s'', ''%:s''].NodeValue := GetValidXMLText(%:s);', { tcBase64 } ' ChildNodesNS[''%:s'', ''%:s''].NodeValue := Base64Encode(%:s);', { tcNode } ' ChildNodesNS[''%:s'', ''%:s''] := %:s;' ), @@ -523,7 +523,7 @@ const { tcDateTime } ' SetAttribute(''%:s'', DateTimeToXML(%:s, xdtDateTime));', { tcDate } ' SetAttribute(''%:s'', DateTimeToXML(%:s, xdtDate));', { tcTime } ' SetAttribute(''%:s'', DateTimeToXML(%:s, xdtTime));', - { tcString } '', + { tcString } ' SetAttribute(''%:s'', GetValidXMLText(%:s));', { tcBase64 } ' SetAttribute(''%:s'', Base64Encode(%:s));', { tcNode } '' ), @@ -535,7 +535,7 @@ const { tcDateTime } ' SetNodeValue(DateTimeToXML(%:s, xdtDateTime));', { tcDate } ' SetNodeValue(DateTimeToXML(%:s, xdtDate));', { tcTime } ' SetNodeValue(DateTimeToXML(%:s, xdtTime));', - { tcString } '', + { tcString } ' SetNodeValue(GetValidXMLText(%:s));', { tcBase64 } ' SetNodeValue(Base64Encode(%:s));', { tcNode } '' ), @@ -547,7 +547,7 @@ const { tcDateTime } ' %:s := DateTimeToXML(%:s, xdtDateTime);', { tcDate } ' %:s := DateTimeToXML(%:s, xdtDate);', { tcTime } ' %:s := DateTimeToXML(%:s, xdtTime);', - { tcString } '', + { tcString } ' %:s := GetValidXMLText(%:s);', { tcBase64 } ' %:s := Base64Encode(%:s);', { tcNode } '' )