<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Is it possible to use the xmlutils app to xml pretty print just ONE field, or part of a log? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Is-it-possible-to-use-the-xmlutils-app-to-xml-pretty-print-just/m-p/339461#M40904</link>
    <description>&lt;P&gt;I have a case where log file include an straight text header in front of well form xml.  &lt;/P&gt;

&lt;P&gt;Here is an exmple:&lt;BR /&gt;
2017-09-05T13:14:02.869Z, ap=695449, xml="well formed xml"&lt;/P&gt;

&lt;P&gt;The Bold is the straight text in front of the XML.&lt;BR /&gt;
Is it possible to use xmlutils to xml pretty print just a single field? Perhaps as a function? &lt;/P&gt;

&lt;P&gt;One problem is exporting data, but keeping the time stamp and ap field. &lt;/P&gt;

&lt;P&gt;I have been trying to work around this by incorporating the time stamp into a larger xml piece and am near to having that working, but I come up with data that web xml validators like, but that still blow up pretty print. &lt;/P&gt;

&lt;P&gt;Doing the xml print on just a field is likely the best solution, if someone can help.&lt;/P&gt;

&lt;P&gt;Using Splunk 6.5.  xmlutils seems to have installed and be working okay.  &lt;/P&gt;</description>
    <pubDate>Thu, 14 Sep 2017 20:15:44 GMT</pubDate>
    <dc:creator>jimdiconectiv</dc:creator>
    <dc:date>2017-09-14T20:15:44Z</dc:date>
    <item>
      <title>Is it possible to use the xmlutils app to xml pretty print just ONE field, or part of a log?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Is-it-possible-to-use-the-xmlutils-app-to-xml-pretty-print-just/m-p/339461#M40904</link>
      <description>&lt;P&gt;I have a case where log file include an straight text header in front of well form xml.  &lt;/P&gt;

&lt;P&gt;Here is an exmple:&lt;BR /&gt;
2017-09-05T13:14:02.869Z, ap=695449, xml="well formed xml"&lt;/P&gt;

&lt;P&gt;The Bold is the straight text in front of the XML.&lt;BR /&gt;
Is it possible to use xmlutils to xml pretty print just a single field? Perhaps as a function? &lt;/P&gt;

&lt;P&gt;One problem is exporting data, but keeping the time stamp and ap field. &lt;/P&gt;

&lt;P&gt;I have been trying to work around this by incorporating the time stamp into a larger xml piece and am near to having that working, but I come up with data that web xml validators like, but that still blow up pretty print. &lt;/P&gt;

&lt;P&gt;Doing the xml print on just a field is likely the best solution, if someone can help.&lt;/P&gt;

&lt;P&gt;Using Splunk 6.5.  xmlutils seems to have installed and be working okay.  &lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2017 20:15:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Is-it-possible-to-use-the-xmlutils-app-to-xml-pretty-print-just/m-p/339461#M40904</guid>
      <dc:creator>jimdiconectiv</dc:creator>
      <dc:date>2017-09-14T20:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the xmlutils app to xml pretty print just ONE field, or part of a log?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Is-it-possible-to-use-the-xmlutils-app-to-xml-pretty-print-just/m-p/339462#M40905</link>
      <description>&lt;P&gt;It does just pretty print one field, either the field "xml" or the field "_raw", in that order.&lt;/P&gt;

&lt;P&gt;So, if you did something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;query... | table _time ap xml | xmlprettyprint
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The field xml would be pretty printed.&lt;/P&gt;

&lt;P&gt;Unfortunately, you can't see it in a table in Splunk, because all white space is collapsed in a table view. You'd need to put the table on a dashboard and add some css to preserve the whitespace. The whitespace should survive in an export, though.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 22:32:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Is-it-possible-to-use-the-xmlutils-app-to-xml-pretty-print-just/m-p/339462#M40905</guid>
      <dc:creator>vbumgarner</dc:creator>
      <dc:date>2017-09-15T22:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the xmlutils app to xml pretty print just ONE field, or part of a log?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Is-it-possible-to-use-the-xmlutils-app-to-xml-pretty-print-just/m-p/339463#M40906</link>
      <description>&lt;P&gt;Thanks much!  I am in process of trying this.  I have a similar case with some JSONs.  I also was able to get pretty printing via using fairly ugly sedcmds to turn the whole log into a single XML expression.  &lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 14:58:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Is-it-possible-to-use-the-xmlutils-app-to-xml-pretty-print-just/m-p/339463#M40906</guid>
      <dc:creator>jimdiconectiv</dc:creator>
      <dc:date>2017-09-21T14:58:12Z</dc:date>
    </item>
  </channel>
</rss>

