ルート属性を読み取ろうとしていますが、wizousxml.nshプラグインを使用して読み取ることができません:(
コード自体は単純明快です。
${xml::LoadFile} "${WHICH_DIR}" $0
${xml::RootElement} $R1 $R0
!ifdef DEBUGMODE_NSISDBG
nsisdbg::sendtolog /NOUNLOAD " root : $R1"
!endif
${xml::GotoPath} "${XML_PATH}" $R1
!ifdef DEBUGMODE_NSISDBG
nsisdbg::sendtolog /NOUNLOAD "GotoPath '${XML_PATH}' result: $R1 "
!endif
${xml::GetAttribute} "${XML_PARAM}" "${XML_VARIABLE}" $R1
!ifdef DEBUGMODE_NSISDBG
nsisdbg::sendtolog /NOUNLOAD "GetAttribute '${XML_PARAM}' result '$R1' : ${XML_VARIABLE} "
${xml::SetAttribute} "port" "$EditTextEditText" $0
${xml::SaveFile} "agent.xml" $0
${xml::Unload}
しかし、出力はまだ私が必要とするものではありません:
<2012.04.17. 13:01:04> root : agent
<2012.04.17. 13:01:04> GotoPath '/agent/' result: -1
<2012.04.17. 13:01:04> GetAttribute 'port' result '0' :
入力XMLファイル:
<?xml version="1.0" encoding="windows-1257"?>
<agent port="0000" loglevel="3">
</agent>
ヒントや助けてくれてありがとう。