Community
    • Login

    Pick XMl from list of XMLS which matching subelements tag values

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 176 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      A Former User
      last edited by

      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>
      
      1 Reply Last reply Reply Quote -1
      • PeterJonesP
        PeterJones
        last edited by

        If you have additional information for a given question, add a reply to that question, rather than opening a new one

        1 Reply Last reply Reply Quote 1
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors