Example file

DataGrab can handle most XML formats. Here’s some examples.

Valid XML files must have all ampersands, e.g. &, escaped, otherwise the import or import configuration will fail. If you are unsure if it is a valid file, run it through a validator.

An XML file

<root>
	<entry>
		<id>A</id>
		<title>Dummy 1</title>
		<date>1973-12-11 13:00:00</date>
		<summary>Adds a related field</summary>
	</entry>
	<entry>
		<id>B</id>
		<title>Dummy 2</title>
		<date>1973-11-04 23:59:00</date>
		<summary>Adds another related field</summary>
	</entry>
</root>

For this example, the path will be

/root/entry

An RSS feed

<?xml version="1.0"?>
<rss version="0.91">
  <channel>
    <title>Channel</title>
    <link>http://test.com/</link>
    <description>Description</description>
    <item>
      <title>Item #1</title>
      <description>Description #1</description>
      <link>http://test.com/1</link>
      <guid>1</guid>
    </item>
    <item>
      <title>Item #2</title>
      <description>Description #2</description>
      <link>http://test.com/2</link>
      <guid>2</guid>
    </item>
  </channel>
</rss>

The path for this file would be

/rss/channel/item

Last updated