简体   繁体   English

在 C++ 中加载 XSD 模式模型

[英]Load XSD schema model in C++

Is there a C++ library I use to load the XSD schema model?是否有用于加载 XSD 架构模型的 C++ 库?

The goal is to load the actual XSD schema model (eventually from multiple files) in a way that I can then inspect the model elements (ie, types, cardinality, attributes, even comments if possible).目标是加载实际的 XSD 模式模型(最终从多个文件),然后我可以检查模型元素(即,类型、基数、属性,如果可能的话,甚至注释)。 I don't want to use it for XML content but to manipulate/inspect the actual model.我不想将它用于 XML 内容,而是要操作/检查实际模型。

I know that in Java it can be done, for example, with Xerces2 ( http://xerces.apache.org/xerces2-j/xml-schema.html ), but I looked for something similar in C++ and could not find it.我知道在 Java 中它可以完成,例如,使用 Xerces2 ( http://xerces.apache.org/xerces2-j/xml-schema.html ),但我在 C++ 中寻找类似的东西但找不到它.

You could look at the C++ implementation of EMF: http://modeling-languages.com/emf4cpp-c-implementation-emf/您可以查看 EMF 的 C++ 实现: http : //modeling-languages.com/emf4cpp-c-implementation-emf/

Then you could use the EMF XSD model: http://www.eclipse.org/modeling/mdt/?project=xsd然后你可以使用 EMF XSD 模型: http : //www.eclipse.org/modeling/mdt/? project=xsd

The EMF XSD model is very well engineered, so the only question is around the maturity of the C++ port of EMF. EMF XSD 模型设计得非常好,所以唯一的问题是 EMF 的 C++ 端口的成熟度。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM