views:

245

answers:

0

I have a problem with supplied XML files which don't have the right location in the XML. I'm trying to get correct XML files, but we might not succeed in getting those so I am looking at alternative solutions. As the DTD is available online, I could do a regex on the XML file and replace the DTD location, but this feels a bit hackish, and is prone to breakage sooner or later if the XML file changes. What I am hoping for is that there is some way of telling PHP to use a specified DTD for parsing the XML files. Does anyone know if such a way exists, or have a different solution?