How to read this XML Structure

Hi,

i got an XML File which have this Structure:

<Obj RefId=“4804”>
<TNRef RefId=“0” />
<MS>
<S N=“Identity”>some-string</S>
<S N=“DisplayName”>Mail0</S>
<S N=“DistinguishedName”>CN=mail0,OU=1,OU=2,DC=dom,tld=de</S>
<S N=“UserPrincipalName”>mail0@dom.tld</S>
<S N=“PrimarySmtpAddress”>mail0@dom.tld</S>
<S N=“RecipientType”>UserMailbox</S>
<S N=“RecipientTypeDetails”>SharedMailbox</S>
<Nil N=“FullAccessPermissions” />
<Obj N=“SendAsPermissions” RefId=“4805”>
<TNRef RefId=“1” />
<LST>
<S>mail1@dom.tld</S>
<S>mail2@dom.tld</S>
</LST>
</Obj>
<Nil N=“SendOnBehalfPermissions” />
</MS>
</Obj>

If there are no value under e.g. SendAsPermissions the node looks like:

<Nil N=“SendAsPermissions” />
<Nil N=“SendOnBehalfPermissions” />

This Schema continue again and again in a single file on over 71.000 Lines at all. MS Excel didnt read this Format well, so i cant use it as it is. My aim is to convert it to a .csv or better xml to create a readable Excelformat. My first idea was to create a new .csv file, read line by line, evaluate each node and append it to the file. But i think there are some better options and thats why i ask you for advise.

Thx

TasteIT

Your post didn’t display too well. Could you create a gist and paste that url in or at least put the xml between pre tags ? I can’t see any way we can help without clear information.

What are you using to generate the xml output? Could you give us an idea what the commandline you used is to see if we can obtain similar data?

@tasteit If you have an XML, posting it in github.gist.com and pasting the link here will be helpful.