Hi
I am trying to parse the below xml file , I need the relation name and table name from the below , I have tried using XML Parse but could not get the desired results, Any help is appreciated.
<relation join='inner' type='join'> <clause type='join'> <expression op='='> <expression op='[account].[id]' /> <expression op='[contact].[accountid]' /> </expression> </clause> <relation join='inner' type='join'> <clause type='join'> <expression op='='> <expression op='[opportunity].[accountid]' /> <expression op='[account].[id]' /> </expression> </clause> <relation join='inner' type='join'> <clause type='join'> <expression op='='> <expression op='[pricebookentry].[product2id]' /> <expression op='[tproduct2].[id]' /> </expression> </clause> <relation join='inner' type='join'> <clause type='join'> <expression op='='> <expression op='[opportunitylineitem].[pricebookentryid]' /> <expression op='[pricebookentry].[id]' /> </expression> </clause> <relation join='inner' type='join'> <clause type='join'> <expression op='='> <expression op='[opportunity].[id]' /> <expression op='[opportunitylineitem].[opportunityid]' /> </expression> </clause> <relation name='opportunity' table='[sfdc].[opportunity]' type='table' /> <relation name='opportunitylineitem' table='[sfdc].[opportunitylineitem]' type='table' /> </relation> <relation name='pricebookentry' table='[sfdc].[pricebookentry]' type='table' /> </relation> <relation name='tproduct2' table='[sfdc].[tproduct2]' type='table' /> </relation> <relation name='account' table='[sfdc].[account]' type='table' /> </relation> <relation name='contact' table='[sfdc].[contact]' type='table' /> </relation>
Thanks
Karthik
Solved! Go to Solution.
Hi @vishwakar,
All the macro that I posted did was strip the nesting out. It was just to give you an idea of where to go from there as nesting seemed to be the issue. I have parsed the resulting fields, a little oddly, because of the triple relation in the last nesting. I also included how you would do it using Regex (much easier).
Kane
Thanks @KaneG for taking time and helping me out.
Thanks
Karthik