我想知道如何让 pyxb 将模式位置添加到生成的 xml,例如。
<ns1:myDocument xmlns:ns1="http://www.mydomain.com/path"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mydomain.com/path myschema.xsd">
在 JAXB 中,我会用
jaxbMarshaller.setProperty(Marshaller.JAXB_SCHEMA_LOCATION,
"http://www.mydomain.com/path myschema.xsd");
知道如何用pyxb做到这一点吗?
非常感谢