How to customize the structure of the XML file
My client wanted to export an XML file, and Views Data Export will output a valid XML file. But it is structured according to how the view
You are browsing documentation for an older version of Drupal, which is not supported any longer, and the information may not be correct. See current documentation for Contributed modules
Step-by-step instructions on how to use Views Data Export (version 6.x-2.0-beta6) to export Pages (including those with multiple tags) into an XML file. This can help you migrate your Pages from a Drupal 6 site into a site running a newer version of Drupal. If you don't want to read through all the instructions, see the attached sample Views Import code that you can use to automatically create this View (although you will need to change the content types and taxonomy vocabularies to match types and vocabularies on your site).
After you decide to "Add" a new view (at admin/build/views/add ), below are the recommended settings for fields on the first screen when exporting pages. This assumes you arel only exporting ONE page type at a time (for example, type1 could be "Blog Posts", and then type2 might be "News articles").
As a general rule, I recommend two good habits when editing Views. First, in your general Views settings (under "Tools" at admin/build/views/tools) check the box for "Disable automatic live preview". The Live Preview can cause JavaScript-related slowness and errors that are annoying. I also recommend that you click on the "Save" button after every change you make to each specific View, so that you don't lose your settings.
Here are the settings you need on the "Defaults" screen.
Under the "Basic Settings" heading, make the following changes.
Under "Fields", here are the recommended page-related settings. First, choose the plus symbol to "Add" a field you want to export. If you have a lot of fields on your site, you may want to choose "Node" from the drop-down menu under "Groups" so you can limit the number of fields you need to look through.
There are two fields that use only the default settings and don't need configured. These are "Node: Path" and "Node: Body". The other Node fields need configured to output content that is formatted to be clean in migrations.
Now, choose "Taxonomy" from the drop-down menu under "Groups" and check the box next to the "Taxonomy: All terms" field. Then, make these changes to that field's configuration:
Remember to click on "Save" and then wait for the Save message at the top of the page.
Underneath the top left of the screen, where you read "Defaults", there is also a drop-down list. Choose "Data export" from this list and then click on the "Add display" button underneath it. This lets us make specific configurations for XML, so that our file of exported Pages works correctly. Here are recommended settings for the "Data export" screen.
Under the "Basic Settings" heading, make the following changes.
After this Save completes, click again on the newly-named display at the top left called "XML." Then, under the "Style Settings" heading, choose the following settings.
After this Save completes, click again on the "XML" display at the top left. Then, under the "Data export settings" heading, choose the following settings.
Visit the path you created and download this file, for example: http://mysite.com/export/pages/type1/xml. If you open this file, you will probably see code that looks like this:
<?xml version="1.0" encoding="UTF-8" ?>
<nodes>
<node>
<ID>403</ID>
<Type>blog</Type>
<Path>/blog/how-to-migrate-content-from-drupal6-to-drupal7-with-feeds-module</Path>
<Title>How to easily migrate pages from Drupal 6 CCK content types to Drupal 7 fields using the Feeds module</Title>
<Updated>2013-12-21 16:02:39 -0400</Updated>
<Tags>drupal;libraries</Tags>
<Body><img src="/sites/default/files/images/feeds-icon-drupalicon-d7small.jpg" alt="Feeds icon showing move from Drupal 6 to 7"> One of the easiest ways to upgrade between version 6 and version 7 of Drupal is to re-build your site in Drupal 7, and then use the <a href="http://drupal.org/project/views_data_export">Views Data Export</a> and <a href="http://drupal.org/project/feeds_xpathparser">Feeds XPath Parser</a> modules to move your pages and articles into your new site. </p><p></Body>
</node>
</nodes>
My client wanted to export an XML file, and Views Data Export will output a valid XML file. But it is structured according to how the view