PHP and Web Services http://unfoldingtheweb.com/2007/05/20/php-and-web-services/ A new way of using the web Fri, 21 Nov 2008 08:22:10 +0000 http://wordpress.org/?v=2.2 PHP and Web Services http://unfoldingtheweb.com/2007/05/20/php-and-web-services/#comment-789 André Luís Mon, 21 May 2007 23:33:53 +0000 http://unfoldingtheweb.com/2007/05/20/php-and-web-services/#comment-789 Thanks for clearing that up. I guess I can see what you mean. Furthermore, the DOM also allows a non-sequencial creation of the document. We can jump up and down the tree, insert, cut, etc. In some cases that might really come in handy... Thanks for clearing that up. I guess I can see what you mean. Furthermore, the DOM also allows a non-sequencial creation of the document. We can jump up and down the tree, insert, cut, etc. In some cases that might really come in handy…

]]>
PHP and Web Services http://unfoldingtheweb.com/2007/05/20/php-and-web-services/#comment-788 Bruno Pedro Mon, 21 May 2007 18:24:43 +0000 http://unfoldingtheweb.com/2007/05/20/php-and-web-services/#comment-788 André: thanks for your comment. Great question too! I'm quoting two articles on this subject. "The real value of using the DOM is that the XML it creates is always well formed." (Herrington, J., "Reading and writing the XML DOM with PHP", http://tinyurl.com/26lenm) "With the W3C DOM, content authors can: - Move one part of the document tree to another without destroying and re-creating the content. - Create elements and attach them to any point in the document tree. - Organize and manipulate new or existing tree branches in a document fragment before inserting the objects back into the tree. The ability to move a part of the document tree without destroying and re-creating the content reduces the size of script and is more efficient." ("About the W3C Document Object Model", MSDN Library, http://tinyurl.com/2erczp) So, basically, it should be easier to manipulate XML by using DOM than directly. André: thanks for your comment. Great question too!

I’m quoting two articles on this subject.

“The real value of using the DOM is that the XML it creates is always well formed.” (Herrington, J., “Reading and writing the XML DOM with PHP”, http://tinyurl.com/26lenm)

“With the W3C DOM, content authors can:

- Move one part of the document tree to another without destroying and re-creating the content.

- Create elements and attach them to any point in the document tree.

- Organize and manipulate new or existing tree branches in a document fragment before inserting the objects back into the tree.

The ability to move a part of the document tree without destroying and re-creating the content reduces the size of script and is more efficient.” (”About the W3C Document Object Model”, MSDN Library, http://tinyurl.com/2erczp)

So, basically, it should be easier to manipulate XML by using DOM than directly.

]]>
PHP and Web Services http://unfoldingtheweb.com/2007/05/20/php-and-web-services/#comment-787 André Luís Mon, 21 May 2007 17:36:40 +0000 http://unfoldingtheweb.com/2007/05/20/php-and-web-services/#comment-787 Congratulations, that was great. A straight to the point presentation on php+webservices. Nicely done. A question though... What's the biggest advantage of using DOM to generate an XML response instead of simply echo-ing it to the browser? Congratulations, that was great. A straight to the point presentation on php+webservices. Nicely done.

A question though… What’s the biggest advantage of using DOM to generate an XML response instead of simply echo-ing it to the browser?

]]>