FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Debugging of object of DomXPath and DomDocument.
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Debugging of object of DomXPath and DomDocument. [message #170276 is a reply to message #170273] Mon, 25 October 2010 17:00 Go to previous message
matt[1] is currently offline  matt[1]
Messages: 40
Registered: September 2010
Karma:
Member
On Oct 25, 5:15 am, plmqaz <pwprad...@gmail.com> wrote:
> Hello All,
>
> We use echo or print_r to get value of variables while debugging PHP
> code.
>
> But, object of domXPath or DomDocument are not captured in echo or
> print_r.
>
> How to get values from above objects while debugging PHP code?
>
> Thanks in advance.

Check out the undocumented C14N() function. Will export a DOMElement
to an XML string. Very useful for visual inspection of document
fragments.

Otherwise, with DOMDocument, use saveHTML() or saveXML(). The output
of that is probably a lot more readable than if print_r() actually did
recurse the entire object.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Stats comp.lang.php (last 7 days)
Next Topic: IT job
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Oct 20 07:33:53 GMT 2024

Total time taken to generate the page: 0.04946 seconds