I have an xml file that I am picking through to dump information into Notes documents. Now I need to search through the xml for a particular value and then find the node that that value appears in. Is this possible?
For instance, I have 10 person nodes that hold name, age and a unique number.
I want to use the unique number string to find the person node that is it contained in.
This will create Notes documents for all person elements that contain the unique number string you specify, and create fields on the document for uniqueNumber and personName.
Subject: Can you search through XML for a specific node value?
One thing you could do here is build a collection of all elements and check the value in each one until you find the one you want. Then obtain the id or name attribute of that element. You could then set a new object to this element or do any other processing on it that you require.
Of course, Esther’s suggestion for using XSLT would be more efficient, particularily if you have a large number of Nodes to process.