我需要刪除XML文件中的標籤(大約1000)。我試過用jQuery,但沒有成功:
<html>
<!--jquery app removes specific <t2_patch ...>-tag -->
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
</head>
<body>
<button>Kill t2_patch-tags </button>
<script>
$("button").click(function() {
$('/home/dan/series14AreaListOnly.xml').remove('t2_patch');
});
</script>
</body>
</html>
我的目標是刪除300MB大型XML文件中的t_patch標籤。這種做法到目前爲止還沒有確定,還是我完全錯了。我如何保存更改? (因爲remove()函數實際上不會直接在xml文件上刪除任何內容?)。
預先感謝任何提示與問候
丹尼亞爾