Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.1 - 日本語

Change language to:
English - Français - Português - Русский

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

Scilabヘルプ >> XML Management > xmlSetAttributes

xmlSetAttributes

属性の名前と値を設定する.

呼び出し手順

xmlObj = xmlSetAttributes(xmlObj, nameValue)

引数

xmlObj

xmlObj, XMLSet または XMLList または XMLElem または XMLAttr型 のXML mlist

nameValue

nameValue, [name value] または [prefix name value]を各行に含む 文字列の n x 2 または n x 3 行列

説明

要素または要素のリストの属性を設定します.

doc = xmlReadStr("<root><a><b><c></c></b></a><b></b></root>");
// 全てのノードを取得します
xp = xmlXPath(doc, "//*");
// 属性 hello="world" および bonjour="monde" を全ノードに追加します
xmlSetAttributes(xp, ["hello" "world" ; "bonjour" "monde"]);
xmlDump(doc)
// 属性 foo="bar" をルートの最初の子に追加します
xmlSetAttributes(doc.root.children(1), ["foo" "bar"]);
xmlDump(doc)
// 属性 bar="foo" をルートの全ての子に追加します
xmlSetAttributes(doc.root.children, ["bar" "foo"]);
// 属性 truc="machin" を2番目の子<b>の属性のリストに追加します
xmlSetAttributes(doc.root.children(2).attributes, ["truc" "machin"]);
xmlDump(doc)
xmlDelete(doc);

参照

  • XMLObjects — 異なるのXMLオブジェクトのプロパティを記述する

履歴

VersionDescription
5.4.0 XMLモジュールが導入されました.
Report an issue
<< xmlSchema XML Management xmlValidate >>

Copyright (c) 2022-2023 (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 Feb 12 23:12:41 CET 2018