HTML5 attributes xmlns, lang, xml:lang

Everything I’ve seen and heard suggests that you should stick to <!DOCTYPE html> <html> <head> <meta charset=”UTF-8″> (or whatever character set you actually want). If you want a language associated with the page you can use the “lang” attribute on the <html> tag. Since HTML5 is not XML, really, I personally would find it weird … Read more

DocumentBuilder.parse(InputStream) returns null

There is a good chance that the stream has been parsed correct, just because xmlDoc.toString() will always be “[#document: null]”. This doesn’t indicate, that the DOM tree is empty. Please check first, if the document has some nodes (children). If the DOM really was empty, then I’d first print the content of the input stream … Read more

INSERT XML into SQL Server 2008 database

Yes, there are issues when you try to insert XML into SQL Server 2008 and the XML contains an encoding instruction line. I typically get around using the CONVERT function which allows me to instruct SQL Server to skip those instructions – use something like this: INSERT INTO testfiles (filename, filemeta) VALUES (‘test.mp3’, CONVERT(XML, N'<?xml … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)