1

have come up against a problem recently and its driving me crazy. Just wondered if anyone can give some advice on it

I'm in the process of exporting data from a EEv1 site to an EEv2 site. So far I have exported some data from a channel into an XML file. What I'd like to be able to do is the following

<?xml version="1.0" encoding="UTF-8"?>


<entries>

{exp:weblog:entries weblog="assets" dynamic="off" status="Open" limit="1000" disable="pagination"}

<entry>

<!-- Entry ID | URL Title | Title | Author | Status | Entry Date --><br/>

<entry_id>{entry_id}</entry_id>
<url_title>{url_title}</url_title>
<title>{title}</title>
<author>{author}</author>
<status>{status}</status>
<entry_date>{entry_date format="%d/%m/%y %h:%i %a"}</entry_date>

<!-- Body --><br/>

<body><![CDATA[{body}]]></body>

<!-- Page Images Matrix --><br/>


<images>{images}
<matrix_cell_1>{image}</matrix_cell_1>
<matrix_cell_2><![CDATA[{label}]]></matrix_cell_2>
<matrix_cell_3><![CDATA[{image-link}]]></matrix_cell_3>
<matrix_cell_4><![CDATA[{openlink1}]]></matrix_cell_4>
{/images}</images>



</entry>
{/exp:weblog:entries}
</entries>

By the above I mean use Expression Engine tags to populate the XML file in a browser

If I save this XML file to the server and then navigate to the file in my browser, it would dynamically display all entries in that weblog in a presentable fashion. However it seems like the XML files just doesn't recognize the {exp:weblog:entries...

I don't get an error, but it just display the tags exactly as shown on the XML file.

Is anyone able to help out with this, as I'm sure I've had it working before. But that was a while ago and I've the feeling I may have missed something

Many Thanks

  • Sounds like EE isn't processing the file. Can you save the XML into an EE template via the EE CP, set the template type as XML, and run it that way? – Michael Boyink Feb 24 '14 at 13:48
  • Yes I can and Presto!, all looking good. Thanks a lot @Michael – Adam Feb 24 '14 at 14:17
  • Sweet -glad to hear it. – Michael Boyink Feb 25 '14 at 15:01
2

Ok so this has been resolved now. With credit to @Michael Boyink who suggested the following;

I had been creating the templates using FTP. However when the templates were created in the Control Panel Template Manager using XML as a template type, the XML gets populated with channel data, just as I had hoped.

Relief!!, this one could have stumped me for days but a simple solution in the end.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.