Extract values from an XML File

Hi,

I need to capture all the attributes with delete next to it. The source XML file is attached.

The output should contain something like this below:

Attributes = legacyExchangeDN
Action = Delete
Username = Hero Joker
Loginid = joker09
OU = cn=Hero.Joker.ext,ou=LCITY,ou=vision,ou=ABC LCITY,ou=roaming,ou=interactive,ou=users,ou=standard,ou=business,dc=national,dc=core,dc=xyz,dc=co,dc=jp
Exchange version = 2010

Please advise,
Thanks much,
prvnrk

Hi prvnrk,

I'm afraid that you will have to be more specific. I see several names attributes with an operation of delete next to it, not only legacyExchangeDN. And where do you get all other fields from? Do you want us to search those from all your xml file?

Please, put effort to give accurate information and there are more chances for you to get accurate answers.

Regards,
Birei.

Thank you birei for your quick reply.

I have 1 HUGE XML file with Lots of user entries and what I attached is of ONLY ONE user info.

If a User has " <modification name="legacyExchangeDN" operation="delete" /> " then we need to capture that user's remaining details (as per o/p format I gave my post #1) and write it into main output file. For e.g., If we get 10 such users then our o/p file will have 60 lines.

thanks again,

Some questions:

1.- Has each user an <postupdate> entry?
2.- Where do you get user's data? From <mapped>, from <joined> or from anywhere else?

I was told it was SINGLE HUGE XML file to parse but later they confirmed that each user has 1 XML file - So it's very easy for me to implement the script on my own.

I did it and working fine.

Thanks much for your willingness to help me...Cheers!