xml dom node
The <xml dom node> objects are the inspectors for the XML Document Object Module (DOM) nodes. The console uses MSXML 6.0 if it is available. Otherwise it falls back to 4.0. The console requires at least 4.0 since 3.0 does not provide XML schema validation.
Version | Platforms |
---|---|
8.0.584.0 | Session, Windows |
9.2.7.53 | Debian, Red Hat, SUSE, Ubuntu |
9.5.13.130 | Raspbian |
Creation
Properties
Returns the name of the specified XML DOM node as a string.Example: node names of child nodes of xml document of file "C:\WINDOWS\system32\icsxml\cmnicfg.xml" - Returns a list of the names of each node in the specified XML document.
Version | Platforms |
---|---|
8.0.584.0 | Session, Windows |
9.2.7.53 | Debian, Red Hat, SUSE, Ubuntu |
9.5.13.130 | Raspbian |
Returns the numeric node type of the specified Document Object Module (DOM) node, 1-12 as shown in the creation inspector.Example: node types of child nodes of xml document of file "icsxml\cmnicfg.xml" of system folder - Returns a list of numeric types for each of the nodes in the specified XML document.
Version | Platforms |
---|---|
8.0.584.0 | Session, Windows |
9.2.7.53 | Debian, Red Hat, SUSE, Ubuntu |
9.5.13.130 | Raspbian |
Returns the node value, which varies depending on the node type. If the standard interface produces a null type, the inspector throws NoSuchObject.Example: node value of first child of xml document of file "icsxml\cmnicfg.xml" of system folder - Returns the value of the first node in the specified file. If the first statement of the file is <xml version="1.0">, for instance, the name would be "xml" and the value would be version="1.0".
Version | Platforms |
---|---|
8.0.584.0 | Session, Windows |
9.2.7.53 | Debian, Red Hat, SUSE, Ubuntu |
9.5.13.130 | Raspbian |
The iterated named property xpaths (<namespace>, <query>) provides a way of specifying the namespaces for the query. If the XML document you are querying over uses namespaces, you must use them in the query and use this property. You create the namespace with xmlns:a='https://namespace'
and leverage the namespace in your query with a:
.
This example pulls commands from Windows Task Scheduler and uses the a:
identifier for the namespace.
- Q: node values of xpaths ("xmlns:a='http://schemas.microsoft.com/windows/2004/02/mit/task'","/a:Task/a:Actions/a:Exec/a:Command/text()") of xml documents of xmls of scheduled tasks
- A: C:\Program Files (x86)\Common Files\Adobe\ARM\1.0\AdobeARM.exe
- A: C:\Program Files (x86)\Google\Update\GoogleUpdate.exe
This example pulls details from the Windows system event log and uses a b:
as the namespace identifier.
- Q: node values of xpaths ("xmlns:b='http://schemas.microsoft.com/win/2004/08/events/event'","/b:Event/b:System/b:Computer/text()") of XML of record (oldest record number of it) of system event log
- A: COMPUTER-123
You could have several namespaces in the xpath query, although this is rare. Two namespaces would appear as xpath ("xmlns:a='https://namespaceA' xmlns:b='https://namespaceB'", "/a:Node1/a:Node2/b:Node3") of <xml dom node>
Version | Platforms |
---|---|
8.0.584.0 | Session, Windows |
9.2.7.53 | Debian, Red Hat, SUSE, Ubuntu |
9.5.13.130 | Raspbian |