473,385 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

DOMExceptions not thrown when I expect them to

When I execute the folowing in PHP5

<?php
*$xml*=*<<<XML
<page>
*<test>Dit*is*een*test<test>
</page>
XML;
*
*$dom*=*new*DomDocument();
*try*{*
**$dom->loadXML(*$xml*);
*}*catch(*DOMException*$e*)*{*
**print*$e;*
*}
?>

I only get error messages, no DOMExceptions. The documentation of the DOM
package on Zend says:
The API of the module follows the DOM Level 2 standard as closely as
possible. Consequently, the API is fully object-oriented. It is a good idea
to have the DOM standard available when using this module.

Followed by a list of possible DOMExceptions and their codes.

My question is, how can I detect XML errors in the document loaded by
$dom->load() without using the PHP error reporting ( set_error_handler(),
set_error_level(), trigger_error()... )

Thanks in advance
*Rutger
--
Rutger Claes ru**********@tiscali.tld
Replace tld with top level domain of belgium to contact me pgp:0x3B7D6BD6
In the next world, you're on your own.
Jul 17 '05 #1
0 1229

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: fabio de francesco | last post by:
Hi, I would like to know why objects that are thrown to be caught are copy-constructed more than once. I have seen this behaviour after running the following simple program that is an...
10
by: Cool Guy | last post by:
Consider: void Start() { if (!TryToDoSomething()) ShowErrorMessage(); }
2
by: Emil Astrom | last post by:
Hi! I wonder if there's a way to retrieve information about thrown, not yet handled exceptions. My situation is similar to the code below: class MySession : IDisposable { : : Dispose()
0
by: test.file | last post by:
We have an application that is running under Citrix. The application files are located on a shared network drive and the app is launched via UNC. The app contains WinForms that are called from...
3
by: Johanna | last post by:
Hello, Thread was being aborted exception is thrown by IIS for my asp.net application on win2003 server. This error has not yet occured with the same asp.net application on windows 2000...
3
by: Giovanni Bassi | last post by:
Hello Group, I am running an operation in a different thread. There are resources that are released when the thread is done running. This is done at the end of the execution as it raises an...
0
by: Jon | last post by:
I have a reproducible problem. In my application I have handlers for both the AppDomain.CurrentDomain.UnhandledException event and the Applciation.ThreadException events. Up until now these...
2
by: Monty | last post by:
I have a GridView in an update panel, and the GridView has an ObjectDataSource. Under certain conditions the Object that is the ObjectDataSource will throw an exception with a specific error...
3
by: Michael Sharman | last post by:
Hi guys, I'm somewhat new to PHP, so please excuse what I hope is an easy question. I've experienced some issues lately where the code on my development environment throws no errors, but when...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.