Oops. Must read entire message before reply. <br><br><div><span class="gmail_quote">On 1/3/07, <b class="gmail_sendername">Khalid B</b> &lt;<a href="mailto:kb@2bits.com">kb@2bits.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Coordinate with Jeremy (Jaza), author of the Import / Export API module<br><a href="http://drupal.org/project/importexportapi" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://drupal.org/project/importexportapi
</a><br><br>See if there is duplication, or possibility of merging your features into his.
<div><span class="e" id="q_10fe99be8b67ba0c_1"><br><br><div><span class="gmail_quote">On 1/3/07, <b class="gmail_sendername">Dave Fletcher</b> &lt;<a href="mailto:fletch@splendora.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
fletch@splendora.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all.<br><br>I created a quick XML import method and I&#39;m wondering if others are<br>interested in it.<br><br>This thing defines a simple XML format with tags: drupal (doc element),<br>vocab, term, user, node, comment. It imports each of these things by
<br>calling the relevant xxx_save() function. Each of those tags can define<br>a &quot;fields&quot; child element. The children of &lt;fields&gt; are turned into<br>object, array, or primitive values and passed to the save func. Node
<br>elements located inside term elements are categorized by that term.<br><br>The system holds a legacy ID which is mapped to a Drupal ID. It is used<br>to ensure a piece of content is not imported multiple times. Therefore,
<br>an XML document can be updated and imported again without causing dupes.<br>The system can also use this ID to reference existing content, for<br>example in a uid field or the taxonomy array.<br><br>Since it&#39;s just calling node_save to do all the work, this system can
<br>import custom node types simply by providing the right &#39;type&#39; field in a<br>node element and providing the fields that the custom node module<br>expects. I have imported 5 different content types using this method: a
<br>custom review type, polls, blog (converted the mt2drupal script to this<br>XML format), a custom newsletter type, and galleries.<br><br>I of course know about Jaza&#39;s work on import/export API but it seemed<br>like an overkill solution to me and I didn&#39;t want to really learn an
<br>API. I just wanted a quick XML format to do some dirty work which I<br>tried to do by hand on the first rev. The XML format mainly allows me to<br>inspect the data before I run the import.<br><br>So my question for you, fellow Drupallers, is does this sound useful to
<br>you? Would it be worth my time turning this thing into a real module?<br>Currently it&#39;s a command-line hack that lives in Drupal root directory<br>and bootstraps. It would be neat if there was a module page, an upload
<br>form, and perhaps some support functions for creating the XML format<br>from code.<br><br>Cheers,<br><br>--fletch<br><br><br></blockquote></div><br>

</span></div></blockquote></div><br>