...
Extract attribute of node for custom field
Code Block |
---|
<?xml version="1.0" encoding="UTF-8" ?>
<!-- generator="WordPress/4.5.4" created="X0XX-YY ZZ:AA" -->
<rss version="2.0"
xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:wp="http://wordpress.org/export/1.2/"
>
<main>
<title>My App Name</title>
<link>http://www.myappurltoapp.com</link>
<desc>Welcome to our website, where you'll find a wealth of information in the form of newsletter articles, calculators, and research reports</desc>
<pubDate>Fri, 04 Oct 2018 11:31:51 +0000</pubDate>
<language>en</language>
<wp:wxr_version>1.2</wp:wxr_version>
<wp:base_site_url>http://www.myappurltoapp.com</wp:base_site_url>
<wp:base_blog_url>http://www.myappurltoapp.com</wp:base_blog_url>
<wp:author>
<wp:author_id>1</wp:author_id>
<wp:author_login><![CDATA[admin]]></wp:author_login>
<wp:author_email><![CDATA[personmail@testmail.com]]></wp:author_email>
<wp:author_display_name><![CDATA[admin]]></wp:author_display_name>
<wp:author_first_name><![CDATA[]]></wp:author_first_name>
<wp:author_last_name><![CDATA[]]></wp:author_last_name>
</wp:author>
<generator>https://wordpress.org/?v=4.5.4</generator>
<item id="first">
<title>Software installed</title>
<link>http://www.myappurltoapp.com/links</link>
<pubDate>Wed, 20 May 2015 11:25:51 +0000</pubDate>
<dc:creator><![CDATA[admin]]></dc:creator>
<guid isPermaLink="false">http://www.homapage.com</guid>
<desc>Welcome to your brand new work space</desc>
</item>
<item id="second">
<title>MailChimp for WordPress: Form Preview</title>
<link>http://mailchimplinktomyapp.com/</link>
<pubDate>Mon, 19 Sep 2018 20:13:12 +0000</pubDate>
<dc:creator><![CDATA[admin]]></dc:creator>
<guid isPermaLink="false">http://salesapps.dev1min30.com/?page_id=5871</guid>
<desc>This article shows a sample questionnaire used as test to navigate the results.</desc>
</item>
</main>
</rss> |
In case you need to extract into custom field Heading Code the attribute isPermaLink of guid node you need to configure the node to be extracted as follows:
Result:
Extract parent node attribute for context
Code Block |
---|
<?xml version="1.0" encoding="UTF-8" ?>
<!-- generator="WordPress/4.5.4" created="X0XX-YY ZZ:AA" -->
<rss version="2.0"
xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:wp="http://wordpress.org/export/1.2/"
>
<main>
<title>My App Name</title>
<link>http://www.myappurltoapp.com</link>
<desc>Welcome to our website, where you'll find a wealth of information in the form of newsletter articles, calculators, and research reports</desc>
<pubDate>Fri, 04 Oct 2018 11:31:51 +0000</pubDate>
<language>en</language>
<wp:wxr_version>1.2</wp:wxr_version>
<wp:base_site_url>http://www.myappurltoapp.com</wp:base_site_url>
<wp:base_blog_url>http://www.myappurltoapp.com</wp:base_blog_url>
<wp:author>
<wp:author_id>1</wp:author_id>
<wp:author_login><![CDATA[admin]]></wp:author_login>
<wp:author_email><![CDATA[personmail@testmail.com]]></wp:author_email>
<wp:author_display_name><![CDATA[admin]]></wp:author_display_name>
<wp:author_first_name><![CDATA[]]></wp:author_first_name>
<wp:author_last_name><![CDATA[]]></wp:author_last_name>
</wp:author>
<generator>https://wordpress.org/?v=4.5.4</generator>
<item id="first">
<title>Software installed</title>
<link>http://www.myappurltoapp.com/links</link>
<pubDate>Wed, 20 May 2015 11:25:51 +0000</pubDate>
<dc:creator><![CDATA[admin]]></dc:creator>
<guid isPermaLink="false">http://www.homapage.com</guid>
<desc>Welcome to your brand new work space</desc>
</item>
<item id="second">
<title>MailChimp for WordPress: Form Preview</title>
<link>http://mailchimplinktomyapp.com/</link>
<pubDate>Mon, 19 Sep 2018 20:13:12 +0000</pubDate>
<dc:creator><![CDATA[admin]]></dc:creator>
<guid isPermaLink="false">http://salesapps.dev1min30.com/?page_id=5871</guid>
<desc>This article shows a sample questionnaire used as test to navigate the results.</desc>
</item>
</main>
</rss> |
In this case you need define custom field here keeping in mind to indicate how far back in the structure of nodes you need to go.
In the example above for instance let's say that we need to extract element desc having id form parent element item extracted into separate column.
To achieve this we need to define the node to be extracted as shown below (defining custom field into which the value of parent's attribute goes, here it HeadingCode custom field):
Result:
Extract node based on attribute value matches
...