我正在使用QueryPath解析Chimpmail的电子邮件模板(https://github.com/mailchimp/Email-Blueprints),但是当我尝试添加一个带有"mc:repeatable“属性的tr时,我得到了这个错误:
Fatal error: Uncaught exception 'QueryPath\ParseException' with message 'DOMDocumentFragment::appendXML(): namespace error : Namespace prefix mc for repeatable on tr is not defined 有没有办法告诉QueryPath不要尝试解析名称空间?
发布于 2014-05-16 02:22:16
我设法解决了这个问题,添加了所需的名称空间声明,然后将其删除:
$el->append('<tr mc:repeatable="" xmlns:mc=http://doesntmatter.com"> [...] </tr>');
$el->removeAttr('xmlns:mc');https://stackoverflow.com/questions/16131580
复制相似问题