I have the following XML format file. I triesd to Parse in Splunk to Reach the Below table format. but i faced an issue to make the Zone repetitive in every line.
<PolicyGlobal>
<Zone>ABC</Zone>
<policy>
<PolicyName>A<PolicyName>
<Attribute1>Value</Attribute1>
<Attribute2>Value</Attribute2>
</policy>
<policy>
<PolicyName>B<PolicyName>
<Attribute1>Value</Attribute1>
<Attribute2>Value</Attribute2>
</policy>
</PolicyGlobal>
<PolicyGlobal>
<Zone>DEF</Zone>
<policy>
<PolicyName>C<PolicyName>
<Attribute1>Value</Attribute1>
<Attribute2>Value</Attribute2>
</policy>
<policy>
<PolicyName>D<PolicyName>
<Attribute1>Value</Attribute1>
<Attribute2>Value</Attribute2>
</policy>
</PolicyGlobal>>
PolicyName,Attribute1,Attribute2,Zone
A,Value,Value,ABC
B,Value,Value,ABC
C,Value,Value,DEF
D,Value,Value,DEF
I tried to cut the values with LINE_BREAKER : with "PolicyGlobal" it gets all the all the policies in 1 line. and if i changed the LINE_BREAKER value with Policy it doesn't get the Zone
Can you help?
... View more