PHP - DOM文档/DOM配置
as stated here the DOMConfiguration is not yet implemented. I need to normalize the namespaces, so that namespaces in child elements will be moved to the root element as long as prefixes are provided.
Is there any non-regexp way to do this?
Through, I am not sure, if this is even possible by DOMConfiguration but I was not even able to try it as you can see.
Maybe there is a way by setting up the libxml?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,正如所评论的,我已经重写了我的代码,以处理 DOM 构建上的命名空间。其工作原理如下:
现在,每次(这里说每次,为了让事情变得更容易)我添加一个元素作为另一个元素的子元素,我调用此方法并主要提供 documentElement 作为第一个参数以将命名空间添加到根元素:
Well, as commented I have rewritten my code, to take care of namespaces on DOM build-up. This works as follows:
Now, everytime (saying everytime here, to make things easier now) I add an element as a child of another element, I call this method and mostly provide the documentElement as the first parameter to add namespaces to the root element: