XML Schema: replacing imports with corresponding schema
问题 I have a XML Schema that contains multiple imports which in turn contain imports. I need to generate semantically equal schema where all imports are inlined. I want to replace these: <xs:import namespace="http://some.name/" schemaLocation="./path/to/it.xsd"/> with the contents of referenced schemata. And I need to get output as a string, not as some internal representation. I tried Apache Xerces but did not find a way to write XSModel to a string. Is there? I tried Apache XmlSchema 2 but when