Siebel Open UI, Tools, Scripting and EAI (MOSC)

MOSC Banner

In an XML, selecting just some children elements and moving them up to the first level

edited Dec 16, 2016 12:27AM in Siebel Open UI, Tools, Scripting and EAI (MOSC) 3 commentsAnswered

Hi,

   

I have an XML generated from “Asset Mgmt - Asset” and “Service Agreement Product” Integration Components in a Workflow like this

<?xml version="1.0"encoding="UTF-8"?>

<SiebelMessage MessageId="1-21YC5J" IntObjectName="SW Asset Activation Info" MessageType="Integration Object" IntObjectFormat="Siebel Hierarchical">

                  <ListOfAsset>

                                  <Asset>

                                                  <AssetId>1-2EQT9RX</AssetId>

                                                  <ListOfServiceAgreementProduct>

                                                                  <ServiceAgreementProduct>

                                                                                  <Created>01/01/2013</Created>

                                                                                  <MaintenanceEndDate>05/31/2015</MaintenanceEndDate>

                                                                                  <MaintenanceStartDate>05/01/2015</MaintenanceStartDate>

                                                                  </ServiceAgreementProduct>

                                                                  <ServiceAgreementProduct>

                                                                                  <Created>01/01/2014</Created>

                                                                                  <MaintenanceEndDate>08/31/2015</MaintenanceEndDate>

                                                                                  <MaintenanceStartDate>06/01/2015</MaintenanceStartDate>

                                                                  </ServiceAgreementProduct>

                                                  </ListOfServiceAgreementProduct>

                                  </Asset>

                  </ListOfAsset>

</SiebelMessage>

  

I would like to take the MaintenanceEndDate and MaintenanceStartDate elements where created is the latest and move them to the top level, so the resulting XML would be like this:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center