A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2009 yearWhat php html tokenizer's can I use? - page 1
User InfoPosts
What php html tokenizer's can I use?#1
I need to process html submitted in my web application and don(t want to munge the whole thing with regular expressions. What tokenizer approach and/or software should I take?

posted date: 2009-04-09 00:13:00


Re: What php html tokenizer's can I use?#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2009-04-09 00:13:01


Re: What php html tokenizer's can I use?#3
I would use the DOMDocument::loadHTML method to load the HTML document. And if you want a simpler handling than the DOMDocument methods, you can convert it to a SimpleXML object by using simplexml_import_dom().

posted date: 2009-04-09 00:29:00


Re: What php html tokenizer's can I use?#4
DOMDocument is nice but it autofixes malformed HTML which I don't want. I wish there was something that parsed the input as-is and threw an error on incorrect syntax.

posted date: 2015-06-20 10:02:00


Re: What php html tokenizer's can I use?#5
Also, if the text is directly inside body, it automatically wraps it in <p> tag, which is just too much autocorrection.

posted date: 2015-06-20 10:07:00


Re: What php html tokenizer's can I use?#6
What did you end up using?

posted date: 2015-06-21 02:11:00


Re: What php html tokenizer's can I use?#7
DOMDocument and the various xPath style methods you can apply on top of that

posted date: 2015-06-22 06:21:00


select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.