Dashboards & Visualizations

xml log line breaking

KarunK
Contributor

Hi All,

I have an xml as below, which is not which not correctly formatted ( whole xml is on one line). I am trying to configure a props.conf file to extract the following xml in the following format.

<listing
<record
</record>
<record
</record>
<record
</record>
</listing>

The props setting looks like below. But i am not able break them to a tree structure as shown above.

Could anyone please help ?

The following props.conf is working well when the xml is put to a xml formatter to format them to a proper xml structure. But otherwise not.

[testing]
BREAK_ONLY_BEFORE = <record
KV_MODE = xml
MUST_BREAK_AFTER = </record>
NO_BINARY_CHECK = 1
SHOULD_LINEMERGE = true
TRUNCATE = 1000000


<?xml version="1.0" ?><listing action="Services" count="71"><message message="Listing is displayed" status="success"/>  <record AuthDSId="null" AuthFormPostUrl="null" AuthFormType="null" BackupAcquirer="null" TraceExpires="null" UnicastDataQos="-1" WeakCertification="false" genId_="82497">      <list name="DirectClusterAssignments" size="0" type="ClusterConfig"/>       <list name="PChannelToClusterAssignments" size="0" type="ClusterConfig"/>       <list name="PChannelToDeviceGroupAssignments" size="0" type="DeviceGroup"/>     <list name="DeviceGroups" size="1" type="DeviceGroup">          <entry id="DeviceGroup_388"/>       </list>     <list name="Playlists" size="0" type="Playlist"/><list name="LibraryNodes" size="0" type="LnConfig"/><list name="CachingNodes" size="0" type="CnConfig"/>   </record>      <record AuthDSId="null" AuthFormPostUrl="null" Fqdn="bpm.test.com" WeakCertification="false" genId_="82899">     <list name="DsvcLocations" size="0" type="DsvcLocation"/>       <list name="ChannelMCasts" size="0" type="ChannelMCast"/>   </record>           <record AuthDSId="null" AuthFormPostUrl="null" Fqdn="mobile.test.com" WeakCertification="True" genId_="82497">      <list name="DsvcLocations" size="0" type="DsvcLocation"/>       <list name="ChannelMCasts" size="0" type="ChannelMCast"/>   </record></listing>
Tags (1)
0 Karma
1 Solution

KarunK
Contributor

Hi All,

I have finally figured it out used the following props. I was using the props to be used along with "REST API Modular Input" App. There was a bug in the App - line breaker was ignored, which "Damien" has fixed and provided an updated beta 06 version. (now available in splunkbase)

Thanks

Regards

KK

DATETIME_CONFIG = CURRENT
KV_MODE = xml
LINE_BREAKER = >(\s+)<record
NO_BINARY_CHECK = 1
SHOULD_LINEMERGE = true
TRUNCATE = 1000000

View solution in original post

0 Karma

KarunK
Contributor

Hi All,

I have finally figured it out used the following props. I was using the props to be used along with "REST API Modular Input" App. There was a bug in the App - line breaker was ignored, which "Damien" has fixed and provided an updated beta 06 version. (now available in splunkbase)

Thanks

Regards

KK

DATETIME_CONFIG = CURRENT
KV_MODE = xml
LINE_BREAKER = >(\s+)<record
NO_BINARY_CHECK = 1
SHOULD_LINEMERGE = true
TRUNCATE = 1000000
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

SOK it to Me: Top 3 Benefits of Using Splunk Operator on Kubernetes that’ll Make ...

    Thursday, July 9, 2026  |  11:00AM–12:00PM PDT Duration: 1 hour (includes Q&A) Managing can feel like a ...

Upgrade Prep for 10.4, Network Observability Deep Dives, and More from Splunk Lantern

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

Splunk Developer Day announcements: AI agents, MCP tools, Forecasting, and Custom ...

Splunk Developer Day was packed with product and platform updates for developers building in the AI ...