Not a developer? Go to

Plugin and Theme Directory

XmlScraper v0.33

By sandman
Posted June 1, 2014, in Utilities.


A plugin that scrapes XML/HTML files from MT templates and retrieves nodes in XPath format.

Example Usage

  • Reflect XML file information on the web
  • Share group site information over different servers

Block Tag

Block tag used for reading XML files *Useable attributes:* * url:the URL you want to scrape (cannot be used with files) * file:the file path you want to scrape (cannot be used with URLs). Include does not work, and AllowFileInclude has no effect. * charset:Typically auto identifies, but can be used to specify if text becomes garbled
Same function as MTXtmlScraper, but used to read HTML files.
Loops the child node specified in a file's xpath *Useable Attributes:* * xpath:Specify a file's objective nodes using xpath format (using XML::Xpath library format) * lastn:Specify the maximum number of entries to display表

Function Tag

Retrives the value of the Xpath selected *Useable Attributes* * xpath:Specify a file's objective nodes using xpath format (using XML::Xpath library format)
Returns the currently selected node

Template Examples

Reading Local Files

Remove the title tag value from the HTML file

<mt:htmlScraper file="/home/">

  <mt:ChildNodes xpath='//title'>*   <:nodeValue xpath="./text()"$>

#### Reading Yahoo News

<pre>`<mt:htmlScraper url="" charset="utf-8">
  <mt:ChildNodes lastn="5" xpath='//div[@id="topicsfb"]//ul[@class="emphasis"]//a'>
  <dt><:nodeValue xpath="./text()"$></dt>
  <dd><:nodeValue xpath="./@href"$></dd>

Plugin Settings

  • User Agent: Specifies the user agent
  • Timeout (seconds): Specifies the time limit when retrieving a file before time out occurs


  1. We do not accept liability for damage that might occur from use of this plugin.
  2. Available for commercial / modified / resale.
  3. Resale is only available if offered for free or less than $10.
  4. Support is not available for this plugin.
  5. Any bugs with the plugin will be fixed in subsequent versions.
  6. Please contact us if you want to discuss customizing this plugin for your specific needs.


  • XML::XMLPath
  • LWP::UserAgent


Movable Type versions: Japanese only

Language Note

XmlScraper or its documentation is not fully localized into English. If you are interested in using XmlScraper but require additional translation, please let us know by e-mailing