Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.1 - Русский

Change language to:
English - Français - 日本語 - Português -

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Справка Scilab >> XML Management > xmlRemove

xmlRemove

Remove an element or a list of elements from their parents

Syntax

xmlRemove(elems)

Arguments

elems

elems, a XMLElem or a XMLSet (result of XPath query) or a XMLlist (a children list)

Description

Detach one or several elements from their parents. The detached elements are definitely lost.

Examples

doc = xmlReadStr("<root><a>Hello</a><b>Scilab</b><a>World</a></root>");

// Remove all the <a>
xp = xmlXPath(doc, "//a");
xmlRemove(xp);
xmlDump(doc)
xmlDelete(doc);

// Remove the first element
doc = xmlReadStr("<root><a>Hello</a><b>Scilab</b><a>World</a></root>");
xmlRemove(doc.root.children(1));
xmlDump(doc)

//Remove all the root children
xmlRemove(doc.root.children);
xmlDump(doc)

xmlDelete(doc);

See also

  • XMLObjects — Describe the properties of the different XML objects

History

ВерсияОписание
5.4.0 XML module introduced.
Report an issue
<< xmlRelaxNG XML Management xmlSchema >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jan 03 14:39:57 CET 2022