設定値を取得 (非推奨)
Values = getPreferencesValue(path2tag, attributes) Values = getPreferencesValue(path2tag, attributes, XMLsource)
unique string: in the XML source file, path targeting a chosen tag whose
attributes must be read. The path is the list of nested tags leading to the
required one, such as "/a/b/c/d"
, or equivalently
"//b/c/d"
. It is case-sensitive.
vector or matrix of strings: names of attributes of the chosen tag, whose values must be read. The order of attributes does not matter wrt their actual order in the tag.
![]() |
|
points to the XML document from which informations must be extracted. It can be one of the following:
SCIHOME+'/XConfiguration.xml'
is considered.XMLdoc
, as returned by a
prior xmlRead(XMLsource)
external instruction.matrix of strings: Values of the chosen attributes of the chosen tag:
attributes
is provided as a
matrix with several rows, then only the first occurrence of the chosen
tag is considered, and Values(i,j)
is the value of
its attributes(i,j)
.attributes
are
provided in a row vector, then
all occurences of the chosen tag
are considered: Results are returned with one row per occurrence,
and one colum per attribute. Thus, Values(i,j)
is the value of the attributes(j)
for the
ith
occurrence of the
tag in the document.evstr()
may be applied to them to get expected numbers.設定ファイル(SCIHOME+'/XConfiguration.xml'
)の
属性の値を取得します.
docを指定した場合, 値はこの文書内で探されます. 複数のリクエストを実行する必要がある際, 同じ設定ファイルを重複してパースすることを避けるために 有用です.
有効な任意のXPathリクエストを指定できます. 例えば,proxy設定を取得するXPathリクエストは以下のように 記述できます:
ファイルSCIHOME+'/XConfiguration.xml'
を開き,指定したノードにアクセスするためのノード名を
取得します:
<?xml version="1.0" encoding="utf-8" standalone="no"?> <interface height="600" path="1/" version="0.17" width="800"> <general title="_(General)"> ... </general> <web title="_(Web)"> <body> <web command-browser="" command-mailer="" default-browser="true" default-mailer="true"/> <proxy enabled="false" host="" password="" port="" user=""/> <previous-proxy enabled="false" host="" password="" port="" user=""/> </body> </web> ... </interface>
パスは"/interface/web/body/proxy"
(または簡単化するために"//web/body/proxy"
)
となります.
Version | Description |
5.5.0 | getPreferencesValue() introduced. |
6.0.0 |
|
6.0.2 | getPreferencesValue() is cloned into xmlGetValues(). It is declared obsolete. |
6.1.0 | getPreferencesValue() is no longer available. |