在数十个xml和xsd文件中,我试图通过它们的名称空间将相应的文件匹配在一起,以便进行相应的解析。我的前任只是试图对其进行硬编码,从而导致许多异常。 尽管我看到here并不是可检索名称空间的主要目标,但是有办法吗?
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://cwe.mitre.org/cwe-6" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cwe="http://cwe.mitre.org/cwe-6" xmlns:xhtml="http://www.w3.org/1999/xhtml" elementFormDefault="qualified" attributeFormDefault="unqualified" version="6.0">
<xs:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd"/>
<xs:annotation>
<xs:documentation>The CWE Schema is maintained by The MITRE Corporation and developed in partnership with the public CWE Community. For more information, including how to get involved in the project and how to submit change requests, please visit the CWE website at https://cwe.mitre.org.</xs:documentation>
<xs:appinfo>
<schema>Core Definition</schema>
<version>6.0.0</version>
<date>08 November 2017</date>