i'm interested in a simple script to parse and replace custom tags in an HTML or text, and replace them with regular HTML. what i'm looking for is exactly like the vB code parser that vBulletin uses for things like URLs and text formatting. the HTML content will be stored in a seperate file.

i'm thinking of either using a vB parser, or using XML to store the text and using PHPs XML parsing to parse. so now for the questions:

if i use XML, can i apply an XSLT transformation to the file before it gets included into the enclosing PHP document and sent to the web browser? in this way i could keep the simple things like bold, italic, and font tags in place.

if i opt to use a vB parser, does anyone know of any free PHP vB parsers in existence, or other resources i can otherwise look at to help me along?

the point of all this is that if the content is formatted to be more like english and less like complicated HTML, it'd be easier for a third party to make sense of and edit the document if they don't have any HTML experience.

thanks a lot!

    i should mention that i'm using a shared webhosting service, so installing extensions and such is most likely impossible. i can hardly even use PHPs mkdir() function, or if i do i can never delete the directory without contacting the web hosting company's support staff.

    from a few quick google searches i found plenty of PHP +XSLT information, but all of it seems to rely on third party extensions.

    perhaps an XML parser would be easiest.

      Write a Reply...