@richard
> I dunno about that whole try/catch thing, but if you're not going to USE
> it to catch the errors, then you might as well be old school and check the
> return values of all these functions.
that sounds good, but , so far I know, if the API says that a function _can_
throw an exception,
Jochem Maas wrote:
Richard Lynch wrote:
php.net/dom
??
Like this?
---
try {
$dom = new DOMDocument();
$config =
$dom->appendChild($dom->importNode(dom_import_simplexml($this->configXML),true));
$config->appendChild( $dom->createElement(($mode?
'softactive':'active'))
);
$this->configXML = simp
Richard Lynch wrote:
php.net/dom
??
Like this?
---
try {
$dom = new DOMDocument();
$config =
$dom->appendChild($dom->importNode(dom_import_simplexml($this->configXML),true));
$config->appendChild( $dom->createElement(($mode? 'softactive':'active'))
);
$this->configXML = simplexml_import_dom($config
Richard Lynch wrote:
...
>>
>>} catch(Exception $e) {}
>
>
> I dunno about that whole try/catch thing, but if you're not going to USE
> it to catch the errors, then you might as well be old school and check the
> return values of all these functions.
>
Agreed 100%. No sense in going through the o
>> php.net/dom
>
> ??
>
> Like this?
>
> ---
>
> try {
>
> $dom = new DOMDocument();
>
> $config =
> $dom->appendChild($dom->importNode(dom_import_simplexml($this->configXML),true));
>
> $config->appendChild( $dom->createElement(($mode? 'softactive':'active'))
> );
>
> $this->configXML = simplexml
> php.net/dom
??
Like this?
---
try {
$dom = new DOMDocument();
$config =
$dom->appendChild($dom->importNode(dom_import_simplexml($this->configXML),true));
$config->appendChild( $dom->createElement(($mode? 'softactive':'active')) );
$this->configXML = simplexml_import_dom($config);
} catc
php.net/dom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
7 matches
Mail list logo