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

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 help >> XML Management > xmlReadStr

xmlReadStr

文字列からXMLツリーを読み込む

呼び出し手順

doc = xmlReadStr(string [, validateDTD])

引数

string

XMLコードを含む文字列.

validateDTD

文書を検証する必要があるかどうかを示す論理値.

doc

XMLDoc型のmlist

説明

XML文字列を読み込んでパースします. 返された文書によりメモリに保持されるDOMツリーにアクセスできます.

validateDTDにtrueが指定された場合, 文書は検証され,失敗するとパース処理は行われません.

(メモリリークを避けるために) xmlDelete関数により ツリーを開放する必要があることに注意してください.

doc = xmlReadStr("<root><a att=""foo"" rib=""bar""><b>Hello</b></a></root>");
e = doc.root.children(1).children(1)
e.name
e.content
xmlDump(e)
doc.root.children(1).attributes.att
doc.root.children(1).attributes.rib

// 属性を修正
doc.root.children(1).attributes.att = "truc"
doc.root.children(1).attributes.rib = "machin"
xmlDump(doc.root.children(1))

// 文書を削除します
xmlDelete(doc);

参照

  • xmlRead — ローカルまたはリモートファイルからXMLストリームを読み込む
  • xmlGetOpenDocs — オープンされたXML文書またはXML検証ファイルを全て取得する.
  • xmlDelete — XML文書を削除
  • xmlDocument — XML文書を新規に作成
  • xmlValidate — DTD, Relax NG または Schema により文書を検証する.

履歴

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

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 Oct 01 17:40:33 CEST 2012