AutoitMike Posted April 16, 2022 Posted April 16, 2022 I am working with an XML file that has parents with multiple children with the exact same name. Each child is selected by the following: SelectSingleNode “/Parent/abc [n]” Where n is the child number. SelectSingleNode “/Parent/abc [0]” would select the first occurance of “/Parent/abc” I just need to know how many of these child nodes, “abc” exist. I dont need this number to simply get to the last node, i dont even need the value there, I just need to know how many of the child nodes exist. There will sometimes be other child nodes with different names under the same parent. Thanks in advance.
Nine Posted April 16, 2022 Posted April 16, 2022 ConsoleWrite("Count = " & $oXML.SelectNodes("path here to the first node").length & @CRLF) This ? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy
AutoitMike Posted April 17, 2022 Author Posted April 17, 2022 15 hours ago, Nine said: ConsoleWrite("Count = " & $oXML.SelectNodes("path here to the first node").length & @CRLF) This ?
AutoitMike Posted April 17, 2022 Author Posted April 17, 2022 Thanks very much. I will try this later tonight.
AutoitMike Posted April 17, 2022 Author Posted April 17, 2022 It works great! Thanks very -very-very much
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now