Take a simple file xml with ID :
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<Root ID="0">
<Elem ID="A" Txt="Capitolo A"></Elem>
<Elem ID="B" Txt="Capitolo B"></Elem>
</Root>
Code: Select all
Dim oDocB : oDocB = CreateUnoService("com.sun.star.xml.dom.DocumentBuilder")
Dim xDoc : xDoc = oDocB.parseURI(sXmlPath) ' percorso del file xml
Code: Select all
Dim MyElem : MyElem = xDoc.getElementById("B")
Thanks in advance