You are here: Re: Valid XML for SimpleXML « PHP Programming Language « IT news, forums, messages
Re: Valid XML for SimpleXML

Posted by Janwillem Borleffs on 07/18/07 20:17

bleen wrote:
> I'm trying to use SimpleXML but I've run into a conundrum. Every day
> an XML file is generated that this script grabs and manipulates. How
> can I check that the XML has no problems before creating my
> SimpleXMLelement object.
>

SimpleXMLElement throws an exception when the XML is invalid:

try {
$xml = new SimpleXMLElement(.....);
} catch (Exception $e) {
// Unparseable XML
}


JW

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация