We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Need a way to display XML custom tags in HTML

Development and Programming

Kevin Justus's avatar
Kevin Justus
1 posts
15 years ago
Kevin Justus's avatar Kevin Justus

I have googled and googled to try to figure out how to do this and I can’t find any good examples.

Is there a way in Expression Engine either via plugin, module, extension or PHP to take an XML feed with custom tags that is NOT RSS and display it in expression engine?

I want to take the custom tags and display them in tables, but I can’t figure out a way to display the data in the tags.

This is the example feed I have:

<WEBCLOSE_XML>
  <ORGANIZATION>
    <CATEGORY>BUSINESS</CATEGORY>
    <ORG_ID>1082</ORG_ID>
    <ORG>Inman Health & Fitness</ORG>
    <STATUS>Regular Schedule</STATUS>
    <STATUS2>
    <ENTERED_ON>02/05/2010</ENTERED_ON>
    <ENTERED_AT>09:53:44 AM</ENTERED_AT>
    <STATUS1LONG>
     <STATUS2LONG>
     <ZIPCODE>29349</ZIPCODE>
     <CITY>Inman</CITY>
     <STATE>SC</STATE>
     <COUNTY>
     <StatusGroup>
   </ORGANIZATION>
</WEBCLOSE_XML>
       
ajlny's avatar
ajlny
42 posts
15 years ago
ajlny's avatar ajlny

1) SimplePie: This is a PHP lib that you could include to parse the XML. SimplePie also supports namespaces, etc., so you can pretty much parse any valid XML file. However, I did run into some very odd memory-related problems with SimplePie that cause Apache to hang. Only after months of usage did we figure this out, but we were using SimplePie for a large amount of feed processing every 5-10 minutes. 2) Custom: You could use the SimpleXML functionality to parse the data. It’s not the most simple approach, but you could probably integrate this in a day or so.

In either case, this involves using plain ol’ PHP in your template.

       
the3mus1can's avatar
the3mus1can
426 posts
15 years ago
the3mus1can's avatar the3mus1can

Have you seen http://expressionengine.com/wiki/XML_Parsing_Tool/?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.