All Apps and Add-ons

Problem with Entering Code Sample

SarahWKarvenz
Path Finder

I cannot get my code to paste in as a code sample (I have another question to ask!). I have copied and pasted the advanced xml into both notepad and word, but am still unable to get it showing as xml in the preview pane below. I have tried pasting it in, then highlighting it and then clicking code block. I have tried hand-typing in the

 tags and still, the code does not show as xml.

I have tried both IE 7 and Firefox 14.0.1. I have flash installed. Is there something else I am missing to get the code block working correctly?

Thanks,
Sarah

Example of how code gets pasted:



index=errvol_summary_fivemin report="1min_Counts" NOT CATEGORY="----" orig_host=$HOST$ JVM=$JVM$ APP=$APP$ LOG_PLATFORM=$LOG_PLATFORM$ DATACENTER=$DATACENTER$ CATEGORY=$CATEGORY$
PIPELINE=$PIPELINE$ | stats sum(count) AS count by APP DATACENTER JVM CATEGORY LOG_PLATFORM orig_host PIPELINE | eval host=orig_host

True
Last 15 Minutes

True

0 Karma

V_at_Splunk
Splunk Employee
Splunk Employee

hi SarawWKarvenz,

This is a little script that will do exactly what you want.

:-)

cheers,

V

lukeh
Contributor

I am still seeing the same problem with the preview window (Jan 2013)

0 Karma

gkanapathy
Splunk Employee
Splunk Employee

You are correct. I am currently seeing a problem with the preview window.

0 Karma

ChrisG
Splunk Employee
Splunk Employee

In the formatting toolbar where you enter your question, click the button that says:

101
010

and paste your code there.

ChrisG
Splunk Employee
Splunk Employee

Yes, this is a known issue with the preview pane; it has been filed with the Splunk Answers team and a fix is in progress.

0 Karma

gkanapathy
Splunk Employee
Splunk Employee

this does appear to be a bug with the preview window

0 Karma

anwarmian
Communicator

Even then the preview window doesn't show it right.

0 Karma

SarahWKarvenz
Path Finder

Apparently it seems to be an issue with my preview window? Since the code now shows in my post correctly, but did not show in my preview pane correctly?

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!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...