Jump to content

Php - Simple Way To Make A Markup Language?


RobberBaron

Recommended Posts

I've been looking through the PHP XML Manual, but I'm trying to find a way to create a simple markup language for my website. For example:I want this:

<rbml:link id="{int}" type="{class}" href="{string}" text="{string}" />

To translate as this:

<a id="{int}" class="{class}" href="{string}">{string}</a>

Is there some way to do this with PHP (since my website is run by PHP)

Link to comment
Share on other sites

The easiest way is to use XSLT, and use PHP to execute the transformation. Alternatively, there's always XMLReader, DOM, etc.You can use those to read the XML, and act accordingly with PHP.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...