WordPress - Generating custom XML file via Loop contents

Hey,

I am wondering if it is possible to generate a custom XML file using WordPress. I want to pull information and create a google map with multiple markers. XML would be like:

<markers>
<marker>HTML HERE FOR BOX</marker>
</markers>

I would use a query to pull data from a custom post type. Can WordPress generate custom XML?

Thanks,

Ryan
LVL 1
catonthecouchproductionsAsked:
Who is Participating?
 
Ray PaseurConnect With a Mentor Commented:
Not sure if WordPress is the right tool for this, but if we can see your test data input and desired outputs we can show you how to do it in PHP.  And since WP is written in PHP it might be easy to integrate the XML generator into your WP code.
0
 
coredatarecoveryCommented:
Yes, you can do this.

You can also see examples in the google sitemap generator plugin, just open the plugin files and browse the code to get an idea of how they go about it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.