How to delete a node from DOM object?

14 ビュー (過去 30 日間)
Keerthana R O
Keerthana R O 2021 年 7 月 21 日
回答済み: Fangjun Jiang 2021 年 7 月 29 日
I have an xml file with code similar to the one below
<F1 Name="abc" Val="0" />
This is read from the xml file and stored in a variable called xDoc. How to make it like below code?
If I try removeChild(), remove() and other similar methods I keep getting error. Please suggest an any other way.

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2021 年 7 月 29 日
use delete() and then write the xDoc to an XML file.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by