PHP Luracast Restler将命名空间属性添加到根元素

时间:2013-03-01 00:12:25

标签: xml rest namespaces restler

对此有些麻烦。如何向根添加命名空间URL属性?我甚至可能吗?欢迎任何变通方法。我必须使用Dublin Core中的一些定义,我的XML要求声明命名空间。即。

<metadata
  xmlns="http://example.org/myapp/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://example.org/myapp/ http://example.org/myapp/schema.xsd"
  xmlns:dc="http://purl.org/dc/elements/1.1/">

  ...
</metadata>

1 个答案:

答案 0 :(得分:0)

目前只能通过扩展XmlFormat类并将命名空间添加到生成的xml

来实现

但是我们正在开发一个支持命名空间的新版XmlFormat