Formatting valid xs:dateTime fields with PHP

Recently I had to compose some XML documents that needed to be validated with XSDs. All fine of course, but I had some problem with two date/time fields that according to the XSD were supposed to be xs:dateTime fields. Googling around I found a lot of references to the ISO8601 format, so I decided to format my date using the DATE_ISO8601 constant. That did not work though.

More namespace gotchas

Earlier on I had a problem with namespaces for getting XML attributes. When I finally got that sorted, I ran into an even weirder problem when fetching elements using xpath. Again, it was just a tiny little detail.

A small SimpleXML gotcha (with namespaces)

I've so far worked only very little with XML with namespaces, especially in terms of parsing it. Therefor, I was quite stumped today on the parsing of a particular snippet of XML which contained an element that had an xlink:href attribute. I just couldn't get that attribute's value out. The solution, as often seems to be the case, is quite simple.

Php5_zce_logo

not tested in IE


Upcoming events

I will be attending 17-04-2010: Pfcongres

Tags

1337 2008 2010 4developers accessibility AdaLovelaceDay09 advent agavi agile amsterdam apache apple article articles atk atkMetaNode audioscrobbler backwards compatibility barcelona bbc bbq beatstad belgium best practices bittorrent book books bughuntday caching cake cal evans cat cerf certificate cfp clear cms cologne common sense community conference conferences continuous integration crisis css custom datetime DbFinderPlugin decorator decorators deployment devdays development directoryindex documentation download dpc dpc09 DPC2008 dreamhost dv7 eclipse ed efficiency enterprise event events expertise ezcomponents facebook flickr framework frameworks freeze frontend fun games germany getting real google googletalk graceful degradation hack hackers hidden gem hiphop howto hp html http ibuildings icann ide imovie indy internet IPC ipc ipc08 javascript jobeet john peel joomla kubuntu left on the web lighttpd lime linux live london loudblog m2ts mac malware mambo marjolein meeting meme meta methodology microsoft movie music mysql namespace namespaces netbeans netherlands nllgg odmarco open source opinion ORM osx paradiso pavilion pear performance personal pfcongrez photo php phpabstract phpBB phpbb phpbelgium phpbenelux phpbnl10 phpgg phpitalia phpnw phpnw08 phptek phptek09 phpuk2009 phpUnderControl phpunit php|architect php|tek podcast politics portability postcrossing presentation presentations public qa recruiting refactoring review rewrite ruby on rails schedule script security seven things sfdaycgn simplexml slides smfony software sogeti solar sound standard standards static steer strings subversion symfony symfonycamp symfonyday symfonyUnderControlPlugin talk talks technology techportal tek09 telecommuting terratec terrorism testfest testing textpattern tips tld tomas unet usability usergroup validation vhost video vinyl virus warp weblogging wiki women work world world of warcraft writing xml xpath xsd yara year youtube ZCE zemanta zend zend framework zend server zend studio Zend_Form
© 2004 - 2010 Stefan Koopmanschap + Powered by Symfony, photos powered by Flickr, links powered by Delicious, Shanghai smilies by Iconbuffet. Feeds: rss / atom. Left on the Web v4.4.0.1