<?xml version="1.0" encoding="UTF-8"?>
<RESPONSE>
<STATUS>
<SERVERTIME><![CDATA[15319123123262]]></SERVERTIME>
<TYPE><![CDATA[getData]]></TYPE>
<RESPONSE_VERSION><![CDATA[1]]></RESPONSE_VERSION>
<DATA_VERSION><![CDATA[1]]></DATA_VERSION>
<VALUE><![CDATA[1]]></VALUE>
<ERRORS />
<WARNINGS />
</STATUS>
<DATA>
<CONTENT RECORDID="f2e110aa8ca24aewq929d26b9fcf3108962">
<METARESOURCEPATH><![CDATA[sites/xyz/content/meta/INFORMATION/0/INF427/]]></METARESOURCEPATH>
<REVIEW_TIMESTAMP><![CDATA[2018-07-20 15:36:00 IST]]></REVIEW_TIMESTAMP>
<REVIEW_TIMESTAMP_MILLIS><![CDATA[1532081160000]]></REVIEW_TIMESTAMP_MILLIS>
<VIEWS>
<VIEW>
<NAME><![CDATA[xyz]]></NAME>
<REFERENCE_KEY><![CDATA[xyz]]></REFERENCE_KEY>
<GUID><![CDATA[6d024478feb441231661f163de62d6e]]></GUID>
<OBJECTID><![CDATA[001]]></OBJECTID>
<PARENTID />
<CHILDCOUNT><![CDATA[8]]></CHILDCOUNT>
</VIEW>
</VIEWS>
<CATEGORIES />
</CONTENT>
</DATA>
</RESPONSE>
我需要在类别的类别中添加一个元素。 每当我尝试添加新类别时,它都不会接受它,因为它会找到重复的类别标签。但是当我尝试删除该空标记时,也不会被接受,因为getelementbyname仅返回类别的null。
<CATEGORIES>
<CATEGORY>
<NAME><![CDATA[xyz]]></NAME>
<REFERENCE_KEY><![CDATA[xyz]]></REFERENCE_KEY>
<GUID><![CDATA[6d024478feb441231661f163de62d6e]]></GUID>
<OBJECTID><![CDATA[001]]></OBJECTID>
<PARENTID />
<CHILDCOUNT><![CDATA[8]]></CHILDCOUNT>
</CATEGORY>
</CATEGORIES>
如何最大程度地提高效率?