Combine Nodes of XML Files

Discussion of XML Namespaces at Parsing Scheduled Task XML may be helpful.

Your top-level XML declaration doesn’t look correct - can you verify that it’s actually xmlns="http://www.w3.org/2001/XMLSchema-instance and not xmlns:http://www.w3.org/2001/XMLSchema-instance" ? The original version won’t load in my XML parser but after this update it does.

Once the xmlns: statement is corrected, I found we need to reference the namespace in the query as well. We need to change the xpath search to terminate at the ‘update’ node, and then retrieve the text values from the child nodes “name”, “version” and “date” of the “update” node:

q: (node value of child node of child nodes whose (node name of it = "name") of it & " - " & node value of child node of child nodes whose (node name of it = "version") of it & " - " & node value of child node of child nodes whose (node name of it = "date") of it) of xpaths ("xmlns:a='http://www.w3.org/2001/XMLSchema-instance'","/a:updates/a:update") of xml document of file "c:\temp\test.xml"
A: Samsung PM9A1 PCIe Gen4 NVMe Solid State Drive Firmware Update - 3630.9229 - December 09, 2022
A: Dell Precision 3260 and 3460 System BIOS - 2.10.0 - December 20, 2023
A: NVIDIA Quadro Pxxxx/RTX xxxx/RTX Axxxx/Txxxx Series Desktop Graphics Driver and NVIDIA Control Panel Application - 31.0.15.3667 - September 14, 2023
1 Like