Quantcast
Channel: AutoHotkey Community
Viewing all articles
Browse latest Browse all 579

Ask for Help (v2) • MSXML DOM find value in other xml

$
0
0
Hello and welcome

so i have 2 big data xml's. examples below

FindCapacity.xml
Spoiler


FindRequests.xml
Spoiler





now if i want to extract the value of "StartTime" from the specific FindCapacity that has the same RequestCode.value as the Findrequest entry... how does that work?

All i try gets me a empty msgbox. am i doing something wrong?
only advice please within line 11-16. The script must execute For ea in RequestDto!
For ease of help, i made sure theres an identical 1165044526 requestcode in the XMLs


For DOM documentation i used https://learn.microsoft.com/en-us/previous-versions/windows/desktop/ms757828(v=vs.85)


My stripped down code looks as follows.

CODE:

XmlProcessor(){
xmlrequest := ComObject("MSXML2.DOMDocument.3.0")
xmlrequest.async := false
xmlrequest.load(findrequestsxml)

xmlcapacity := ComObject("MSXML2.DOMDocument.3.0")
xmlcapacity.async := false
xmlcapacity.load(findcapacityxml)

for ea in xmlrequest.getElementsByTagName("RequestDto")
{

MsgBox xmlcapacity.selectSingleNode("//Capacity/CapacityList[requestcode=" ea.getElementsByTagName("Code").item(0).text "]/StartTime")


}
}

F1::XmlProcessor
^r::reload

Statistics: Posted by jaccotjuhhh — Today, 13:29



Viewing all articles
Browse latest Browse all 579

Trending Articles