ApprovalSetting: If "& lt; br & gt;" is entered in Approver_Role, what error occurs when applying for the form, because & lt; is encountered when combining XML strings ;. Escape. Special characters in ServiceForFlowER. cs Approval Setting:
If Approver_Role inputs"
", So what error occurred when applying for the form, because the XML string was encountered <. Escape.
ServiceForFlowER. cs
approvalXML += "" + "" + GetEmpID(approverTable.Rows[i][entityApprover.Approver.PhysicalFieldName].ToString()) + "" + "
" + approverTable.Rows[i][entityApprover.ApprovalOrder.PhysicalFieldName].ToString() + "
" + "" + approverTable.Rows[i][entityApprover.Role.PhysicalFieldName].ToString() + "" + "";
PS:
InvalidXMLThe character must be replaced with the corresponding entity.
If you use a character similar to "<" in the XML document, the parser will encounter an error because the parser considers this as the beginning of a new element. Therefore, the code should not be written as follows:
To avoid this situation, you must convert the character "<" to an object, as shown below:
The following are five pre-defined entities in the XML document:
< |
< |
Yu No. |
> |
> |
Yu No. |
& |
& |
And |
' |
' |
Single quotes |
" |
" |
Double quotation marks |
The object must start with the symbol "&" and end with the symbol ";".
Note:Only the "<" and "&" characters are strictly forbidden for XML. The rest are legal. it is a good habit to use entities to reduce errors.
The above is a detailed description of the special characters in XML. For more information, see other related articles in the first PHP community!