How to display XML String in a cell?
How to display XML String in a cell?
There is a JSON string returned from the server:
[code]{"sEcho":"2","iTotalRecords":1,"iTotalDisplayRecords":1,"aaData":[{"ID":1,"Response":[],"SN":"fe07d14f-ad54-46d1-94a2-54e7ad81fbee","MSG_ID":"0429000001","RECEIVE_TIME":"2012/12/3 15:01:01","MSG_CONTENT":"\u003c?xml version=\u00271.0\u0027 encoding=\u0027utf-8\u0027?\u003e\u003cMessage MsgID= \"0424000003\" ResourceID= \"0424\" SN= \"fe07d14f-ad54-46d1-94a2-54e7ad81fbee\" \u003e\u003cDataSet\u003e\u003cEntitiyName\u003eXHIT.N_HRIM_EMPLOYEE\u003c/EntitiyName\u003e\u003cRows\u003e\u003cDataRow\u003e\u003cPERFORMANCE_POSI_NAME\u003eabc\u003c/PERFORMANCE_POSI_NAME\u003e\u003cPROCESS_ID\u003e6025\u003c/PROCESS_ID\u003e\u003cWORK_STATUS_NAME\u003eonLine\u003c/WORK_STATUS_NAME\u003e\u003cSEQ_ID\u003e211770\u003c/SEQ_ID\u003e\u003cINF_CREATE_TIME\u003e2012-06-20 00:01:24\u003c/INF_CREATE_TIME\u003e\u003cINF_MSG_STATUS\u003e0\u003c/INF_MSG_STATUS\u003e\u003cEMP_CODE\u003e0840657\u003c/EMP_CODE\u003e\u003cEMP_NAME\u003etang\u003c/EMP_NAME\u003e\u003cGENDER\u003eman\u003c/GENDER\u003e\u003cWORK_STATUS_CODE\u003e11\u003c/WORK_STATUS_CODE\u003e\u003cORG_CODE\u003e1205B311\u003c/ORG_CODE\u003e\u003cPERFORMANCE_POSI_CODE\u003eC00000000001699\u003c/PERFORMANCE_POSI_CODE\u003e\u003c/DataRow\u003e\u003c/DataRow\u003e\u003c/Rows\u003e\u003c/DataSet\u003e\u003c/Message\u003e","MSG_TYPE":1,"MSG_SENDER":null,"MSG_RECEIVER":null,"SYS_NAME":null,"TP_MEMO":"0","ST_MEMO":"YES"}]}[/code]
MSG_CONTENT field values ββis an XML string, But Datatalbes not be able to completely display the contents of the "MSG_CONTENT". Remove all the <,>, and so on.
[code]{"sEcho":"2","iTotalRecords":1,"iTotalDisplayRecords":1,"aaData":[{"ID":1,"Response":[],"SN":"fe07d14f-ad54-46d1-94a2-54e7ad81fbee","MSG_ID":"0429000001","RECEIVE_TIME":"2012/12/3 15:01:01","MSG_CONTENT":"\u003c?xml version=\u00271.0\u0027 encoding=\u0027utf-8\u0027?\u003e\u003cMessage MsgID= \"0424000003\" ResourceID= \"0424\" SN= \"fe07d14f-ad54-46d1-94a2-54e7ad81fbee\" \u003e\u003cDataSet\u003e\u003cEntitiyName\u003eXHIT.N_HRIM_EMPLOYEE\u003c/EntitiyName\u003e\u003cRows\u003e\u003cDataRow\u003e\u003cPERFORMANCE_POSI_NAME\u003eabc\u003c/PERFORMANCE_POSI_NAME\u003e\u003cPROCESS_ID\u003e6025\u003c/PROCESS_ID\u003e\u003cWORK_STATUS_NAME\u003eonLine\u003c/WORK_STATUS_NAME\u003e\u003cSEQ_ID\u003e211770\u003c/SEQ_ID\u003e\u003cINF_CREATE_TIME\u003e2012-06-20 00:01:24\u003c/INF_CREATE_TIME\u003e\u003cINF_MSG_STATUS\u003e0\u003c/INF_MSG_STATUS\u003e\u003cEMP_CODE\u003e0840657\u003c/EMP_CODE\u003e\u003cEMP_NAME\u003etang\u003c/EMP_NAME\u003e\u003cGENDER\u003eman\u003c/GENDER\u003e\u003cWORK_STATUS_CODE\u003e11\u003c/WORK_STATUS_CODE\u003e\u003cORG_CODE\u003e1205B311\u003c/ORG_CODE\u003e\u003cPERFORMANCE_POSI_CODE\u003eC00000000001699\u003c/PERFORMANCE_POSI_CODE\u003e\u003c/DataRow\u003e\u003c/DataRow\u003e\u003c/Rows\u003e\u003c/DataSet\u003e\u003c/Message\u003e","MSG_TYPE":1,"MSG_SENDER":null,"MSG_RECEIVER":null,"SYS_NAME":null,"TP_MEMO":"0","ST_MEMO":"YES"}]}[/code]
MSG_CONTENT field values ββis an XML string, But Datatalbes not be able to completely display the contents of the "MSG_CONTENT". Remove all the <,>, and so on.
This discussion has been closed.
Replies
Allan