how to read Data From XML File, especially from config lastmodified and attribute name="core.interface", and how to change the value or text into something else like <attribute name="core.interface">Wireless Network Adapter</attribute>
i try read This but no luck
thanks in advance
Code: Select all
data=
(join`r`n
<?xml version="1.0" encoding="UTF-8" ?>
<!--
NetSpeedMonitor Configuration
-->
<config lastmodified="2018-05-28 07:49:58">
<attribute name="core.language">en-us</attribute>
<attribute name="core.monitoring">1</attribute>
<attribute name="core.interface">Qualcomm Atheros PCI-E Fast Ethernet Controller</attribute>
<attribute name="core.bitrate">0</attribute>
<attribute name="core.precision">2</attribute>
<attribute name="core.doubleclick">4</attribute>
<attribute name="dialog.welcome">0</attribute>
<attribute name="dialog.donate">0</attribute>
<attribute name="traffic.enable">1</attribute>
<attribute name="traffic.database">C:\data.db</attribute>
<attribute name="traffic.group">1</attribute>
<attribute name="traffic.unit">2</attribute>
<attribute name="traffic.collapse">0</attribute>
<attribute name="version.auto">0</attribute>
<attribute name="version.timestamp">1526975404</attribute>
<attribute name="tooltip.enable">1</attribute>
<attribute name="tooltip.delay">0</attribute>
<attribute name="tooltip.unit">0</attribute>
<attribute name="layout.font">Segoe UI</attribute>
<attribute name="layout.size">8</attribute>
<attribute name="layout.quality">1</attribute>
<attribute name="layout.color">16777215</attribute>
<attribute name="layout.glow">0</attribute>
<attribute name="layout.bold">0</attribute>
<attribute name="layout.poshor">2</attribute>
<attribute name="layout.posver">1</attribute>
<attribute name="layout.valuewidth">6</attribute>
<attribute name="layout.bitrate">1</attribute>
<attribute name="layout.changeorder">0</attribute>
<attribute name="layout.alignment">0</attribute>
<attribute name="layout.textsent">U:</attribute>
<attribute name="layout.textrecv">D:</attribute>
<attribute name="layout.margin">0</attribute>
<attribute name="layout.marginhor">8</attribute>
<attribute name="layout.marginver">0</attribute>
<attribute name="connections.tcp">1</attribute>
<attribute name="connections.udp">1</attribute>
<attribute name="connections.hostnames">1</attribute>
<attribute name="connections.unconnected">1</attribute>
<attribute name="connections.refreh">1</attribute>
</config>
)
o := ComObjCreate("MSXML2.DOMDocument.6.0")
o.async := false
o.loadXML(data)
functions := o.selectNodes("/config/attribute") ;Loop
for node in functions
msgbox % node.text