我有一个xml,想要从xml文档中删除某些元素。最初我想删除这些元素中的控制字符,或者完全删除这些元素中的数据。
我的样本有效负载如下。我想删除简历/内容和评论。
<Jobs>
<candidates>
<address2/>
<application>
<comments><BR />Test emp1711 Newberg St. #4 Oregon, CA 97229 444-123-9752 testcandidate@gmail.com<BR />authorName: Test 1 comment content: <b>To: test test (test.test@yahoo.com)</b><br /><br />From: abc Recruitment Team (test@abc.com)<br /><br />Subject: Tester at abc<br /><br /><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="12" COLOR="#353A3F" LETTERSPACING="0" KERNING="0">Hello test,</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="12" COLOR="#353A3F" LETTERSPACING="0" KERNING="0"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="12" COLOR="#353A3F" LETTERSPACING="0" KERNING="0">Thank you for your interest in our abc opening. </FONT></P></comments>
<disposition>tesr Skills match</disposition>
<eId>xyz</eId>
<gender>Male</gender>
<lastUpdatedDate>1340687163</lastUpdatedDate>
<race>Undefined</race>
<resume>
<content>Test<BR />Human Resources Manager / Business Partner <BR /> portland, Oregon; 4454; <BR /> Phone 020 444456;Mobile 088768999;E-mail test@yahoo.com <BR /></content>
<format>Text</format>
</resume>
<sentDate>1789993473</sentDate>
<source>Linkedin</source>
<sourceType>Import</sourceType>
<veteranStatus>Undefined</veteranStatus>
<workflowState>Offer Accepted</workflowState>
<city>portland</city>
<companyName/>
<country>US</country>
<eId>xyz</eId>
</application>
</candidates>
<candidates>
<address2/>
<application>
<comments><BR />Test emp2711 Newberg St. #4 Oregon, CA 97229 444-123-9752 testcandidate2@gmail.com<BR />authorName: Test 2 </comments>
<disposition>Skills match</disposition>
<eId>xyz</eId>
<gender>female</gender>
<lastUpdatedDate>1340687163</lastUpdatedDate>
<race>Undefined</race>
<resume>
<content>Test<BR />Program Manager / Business Partner <BR /> portland, Oregon; 4454; <BR /> Phone 020 444456;Mobile 088768999;E-mail test@yahoo.com <BR /></content>
<format>Text</format>
</resume>
<sentDate>178444473</sentDate>
<source>Linkedin</source>
<sourceType>Import</sourceType>
<veteranStatus>Undefined</veteranStatus>
<workflowState>Offer Accepted</workflowState>
<city>portland</city>
<companyName/>
<country>US</country>
<eId>xyzabc</eId>`enter code here`
</application>
</candidates>
</Jobs>