php - I need a tool that allows me to quickly generate html and xquery it -
Currently I have a good class that generates HTML and I like to stop without worrying about things like pg Allows to make, proper nesting, or explicit formatting syntax is straightforward and straight forward,
// an anchor tag $ anchor = new tag ("a", array ("name "= & Gt;" anchor "); // Create $ Paragraph = Tag :: Craft (" p "," article android developers almet, painted ".); // container for them $ Div = & tag; plus ($ paragraph); $ div; echo; creates:
gt; ; P & gt; Code> It's all well and good, I can immediately create tags, fill them with content and other tags, and can clearly output them However, I can not do such work, like take the existing HTML and find it in Find the tag using something like, or something like the xpath.
As far as I can be told that I have 2 options:
- Write time to write functionality in the Exception and My Tag Tool, annoying and possibly elsewhere Efforts to be spent
- Use the dom ock jects. Very bizarre documentation and places not fully baked. Especially when some of the php of production environment are backwards, apart from HTML, HTML will be used for XML which can cause a lot of errors and logs spam.
Any ideas from here where should I go from here? Or the experience of using DOM to achieve this?
I would say that the shot was made in Dome. To give you some hints about your concerns:
- 'Sparse documentation': While PHP manual is probably not verbose (in my opinion, but actually fewer old functionality), this is very much DOM standard with fewer exceptions: Any implementation of the DOM should work on documentation.
- Not fully cooked => Do you really care to make the mean?
- DOM has been in PHP for a short time, if you use PHP 5.0 or 5.1, then you can probably use it.
- The error level of the DOM is adjustable, with
DOMDocument-> strict enter checking
property, and libxml_use_internal_errors ()
, which you can hide for errors You can use / decide for yourself what to do with them. - And with
DOMDocument :: registerNodeClass ()
you can do DOMElement
by the function & amp; - Implementation is quite customizable in C, and possibly more and more bugfree (for the time being, maybe that may be)) you are a great programmer) then implement your own implementation.
Everything, it depends on that time when it can make it easier by DOMDocument (which lets you stretch internal classes) or rolling your own extenstions / extra in your library if your If the needs are very few and quickly meet with your own rolling, then write your own in every way If you are going on the path while writing your own XPath implementation (which looks like fun), then < Em> entire XPath 1.0 or 2. Make sure to add 0 specification: For the future developers, there is nothing more disappointing, when implementing an incomplete spectacle when they do not expect them.
Comments
Post a Comment