Jump to content

Php - Simple Way To Make A Markup Language?


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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...