Sometimes you need to export a collection of data for use to another system.  One of the easiest ways is to export it to XML as it is widely accepted as a data exchange format and standard.  PHP makes creating and exporting to XML very easy.  Below I’ll show you an example where I am exporting… Read More

I had to process a lot of Word .docx files into readable content for use in a searchable database.  Docx files are basically xml files in a zipfile container (as described by wikipedia).  Here is my solution, it’s pretty straight forward.  Just pass in the server file path to the read_docx() function and it will… Read More

When you put UTF-8 encoded strings into an XML document you should remember that not all UTF-8 characters are accepted in an XML document You should strip away the invalid characters, else you’ll have an XML fatal parsing error tossed during parsing. It’s rather easy to accomplish this using the following function.

 … Read More