<?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 spath xml parsing in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/spath-xml-parsing/m-p/102371#M26445</link>
    <description>&lt;P&gt;I'm trying to extract the "user.name" field from the XML below (in pastebin). However, I can't seem to write an spath command that will do it. I was wondering if anyone could help me out. I'm wondering if my issue is that my tags have periods in them.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://pastebin.com/0g83eBY8"&gt;http://pastebin.com/0g83eBY8&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Jul 2012 18:14:16 GMT</pubDate>
    <dc:creator>glasserd17</dc:creator>
    <dc:date>2012-07-18T18:14:16Z</dc:date>
    <item>
      <title>spath xml parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/spath-xml-parsing/m-p/102371#M26445</link>
      <description>&lt;P&gt;I'm trying to extract the "user.name" field from the XML below (in pastebin). However, I can't seem to write an spath command that will do it. I was wondering if anyone could help me out. I'm wondering if my issue is that my tags have periods in them.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://pastebin.com/0g83eBY8"&gt;http://pastebin.com/0g83eBY8&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2012 18:14:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/spath-xml-parsing/m-p/102371#M26445</guid>
      <dc:creator>glasserd17</dc:creator>
      <dc:date>2012-07-18T18:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: spath xml parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/spath-xml-parsing/m-p/102372#M26446</link>
      <description>&lt;P&gt;Hey gloasserd17,&lt;/P&gt;

&lt;P&gt;I think you are on the right track with thinking you naming conventions are the issue.  I have just been looking at your xml data and it looks like splunk is getting mixed up with the period in between the tag elements, and I can only think that the best option would be to create a rex to search for the username values instead. Like the one below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype="TestXML" | head 10000 | rex "(?i)\\.name&amp;gt;(?P&amp;lt;FIELDNAME&amp;gt;[^&amp;lt;]+)" | top 50 FIELDNAME
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can then do what you want with the data.  You could also extract this information through props.conf at index time.&lt;/P&gt;

&lt;P&gt;I hope this helped.&lt;/P&gt;

&lt;P&gt;Regards vince&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2012 23:51:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/spath-xml-parsing/m-p/102372#M26446</guid>
      <dc:creator>vincesesto</dc:creator>
      <dc:date>2012-10-10T23:51:54Z</dc:date>
    </item>
  </channel>
</rss>

