Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 internet speed test! ×
User Journal

Journal Chacham's Journal: Question: Parsing tool to be called from PHP? 4

I have been contracted to write a system with an HTML interface, to grab an html template, to parse noted tags from the template, present the tags to the user, accept text from the user, replace the tags with the text, and display a rendered version of the parsed template to the user. This includes saving tag data, and the finsished template.

The database used to store all the data is Oracle, the web server is Apache, and the interface language is PHP. The screens in the end will be designed by someone else, but for the meanwhile i must come up with a (crude) interface. It was also strongly suggested that the tage be enclosed in less-than and greater-than signs.

I have already gotten the database schema, and am now deciding on how to do the parsing. That is something I haven't much experience in. I am curious if it would be better to do it in PHP (which i am familiar with) or find a program to do it, possibly a commandline tool such as cut.

Then there's presenting the parsed template to the user. By default another window would be opened. I'm debating if frames would be a good idea, or the like.

Any ideas?

This discussion has been archived. No new comments can be posted.

Question: Parsing tool to be called from PHP?

Comments Filter:
  • Its just better with the parsing and cutting, and you obviously know your regexp. Just think its a better tool for the job.
  • I see no mention of XML/XSL in your question but that's exactly what you're describing. The user inputted tags define the XML file. An XSLT file is applied to turn it into an HTML output. No parsing or scraping involved at any time. Save the input by saving the XML file. Change the output by changing the XSL. Again, no programming involved.

    What you need to build is a way to generically enter XML files from a user form. There's something called XForms out there which is probably close, but in all the

    • This sounds very good. Now to search what it all means. I've heard of XML but never really looked at it. The rest of the stuff, is a beyond what i am currently aware of.


A list is only as strong as its weakest link. -- Don Knuth