PDA

View Full Version : a thought about bbcodes and xml...


Milorad
07-13-2004, 10:03 PM
is there a way to turn the BBcode system into a very basic XML parser? it seems pretty similar already.

Could the [] be changed to <> ?

For instance... if I were to create a few custom tags in my bbcode system to process something like:


<catalogue>
<cd>
<title>Becoming X</title>
<artist>Sneaker Pimps</artist>
<track>blah</track>
<track>blah</track>
<track>...</track>
</cd>
</catalogue>


Is something like this feasable? - can one nest custom BBcodes reliably?

... I'm just kinda thinking out loud... but I think that this would be good for forums with a heavy article focus.

Xenon
07-13-2004, 10:18 PM
Hmm, you could create a new bbcode [XML] by hacking functions_bbcode parse.

and then send everything between those xml tags through the php xml functions.

(i'm just talking about the basic way of course)

I think if you spend a bit time regarding some security issues, that should be the best way

Milorad
07-13-2004, 11:23 PM
see, if I did that, I'd still have to create an XSL style sheet... the BBcode system would allow multiple administrators to drop tag definitions into the pool without the complication of XSL syntax.

I've done some XML transformation before so its not too difficult for me, but I can't say the same about other contributors.

I'm hoping people will be able to talk this out with me because talking it through helps me see the issues with it. Thanks for the reply Xenon.