Pick XMl from list of XMLS which matching subelements tag values
-
Re: Pick XMl from list of XMLs based on the matching conditions
Sorry Pls use below formatted details <ns:name> <ns:location>asfsafs</ns:location> <ns:locationevent>yyyy</ns:locationevent> <ns:locations> <ns:location1> <ns:locationphase> <ns:Action> <ns:name>Prior</ns:name> </ns:Action> <ns:Status>Completed</ns:Status> </ns:locationphase> </ns:location1> <ns:location1> <ns:locationphase> <ns:Action> <ns:name>Current</ns:name> </ns:Action> <ns:Status>Completed</ns:Status> </ns:locationphase> </ns:location1> <ns:location1> <ns:locationphase> <ns:Action> <ns:name>Future</ns:name> </ns:Action> <ns:Status>Pending</ns:Status> </ns:locationphase> </ns:location1> </ns:locations> <ns:Action> <ns:name>abc</ns:name> </ns:Action> <ns:Action> <ns:name>def</ns:name> </ns:Action> <ID>125</ID> <ns:Coverage> <ns:Action> <ns:name>deg</ns:name> </ns:Action> <ns:Action> <ns:name>def</ns:name> </ns:Action> </ns:Coverage> </ns:name> <ns:name> <ns:location>asfsafs</ns:location> <ns:locationevent>yyyy</ns:locationevent> <ns:locations> <ns:location1> <ns:locationphase> <ns:Action> <ns:name>Prior</ns:name> </ns:Action> <ns:Status>Completed</ns:Status> </ns:locationphase> </ns:location1> <ns:location1> <ns:locationphase> <ns:Action> <ns:name>Current</ns:name> </ns:Action> <ns:Status>Completed</ns:Status> </ns:locationphase> </ns:location1> <ns:location1> <ns:locationphase> <ns:Action> <ns:name>Future</ns:name> </ns:Action> <ns:Status>Pending</ns:Status> </ns:locationphase> </ns:location1> </ns:locations> <ns:Action> <ns:name>abc</ns:name> </ns:Action> <ns:Action> <ns:name>def</ns:name> </ns:Action> <ID>1234ID> <ns:Coverage> <ns:Action> <ns:name>deg</ns:name> </ns:Action> <ns:Action> <ns:name>def</ns:name> </ns:Action> </ns:Coverage> </ns:name> <ns:name> <ns:location>asfsafs</ns:location> <ns:locationevent>yyyy</ns:locationevent> <ns:locations> <ns:location1> <ns:locationphase> <ns:Action> <ns:name>Prior</ns:name> </ns:Action> <ns:Status>Completed</ns:Status> </ns:locationphase> </ns:location1> <ns:location1> <ns:locationphase> <ns:Action> <ns:name>Current</ns:name> </ns:Action> <ns:Status>Completed</ns:Status> </ns:locationphase> </ns:location1> <ns:location1> <ns:locationphase> <ns:Action> <ns:name>Future</ns:name> </ns:Action> <ns:Status>Pending</ns:Status> </ns:locationphase> </ns:location1> </ns:locations> <ns:Action> <ns:name>abc</ns:name> </ns:Action> <ns:Action> <ns:name>def</ns:name> </ns:Action> <ID>123</ID> <ns:Coverage> <ns:Action> <ns:name>deg</ns:name> </ns:Action> <ns:Action> <ns:name>def</ns:name> </ns:Action> </ns:Coverage> </ns:name> I need only the whole XML which matches the following conditions. Condition 1: <ns:name>…<ns:locationevent>yyyy</ns:locationevent> Condition 2: <ns:name>…<ns:Action> <ns:name>def</ns:name> </ns:Action> – May have more than one action with name with other values Condition 3: <ns:name>…<ns:Action> <ns:ID>123</ns:ID> </ns:Action> -
If you have additional information for a given question, add a reply to that question, rather than opening a new one
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login