Kbase P165022: Errors 13035 and 13115 reading XML document validated by DTD
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/2010 |
|
Status: Unverified
SYMPTOM(s):
Errors 13035 and 13115 reading XML document validated by DTD
Error reading XML file '<file>'. (13035)
Error while parsing the XML Document: <error>. (13115)
Error while parsing the XML Document: FATAL ERROR: file'http://xml.cxml.org/schemas/cXML/1.2.021/cXML.dtd', line '15', 'column '2', message 'Expected comment or CDATA'. (13115)
FACT(s) (Environment):
Code is similar to the following:
ASSIGN cSourceType = "file"
cFile = "myXML.xml"
cReadMode = "empty"
cSchemaLocation = "http://xml.cxml.org/schemas/cXML/1.2.021/cXML.dtd"
lOverrideDefaultMapping = ?
cFieldTypeMapping = ?
cVerifySchemaMode = ?.
retOK = hDSet:READ-XML(cSourceType, cFile, cReadMode, cSchemaLocation, lOverrideDefaultMapping, cFieldTypeMapping, cVerifySchemaMode).
All Supported Operating Systems
OpenEdge 10.1A
CAUSE:
The schema-location parameter of the READ-XML method expects a reference to an XML Schema (.xsd) file, not a DTD (Document Type Definition). Although the two types of files are both used for validating XML documents, they have different formats.
FIX:
Depending on the requirements of the application, do one of the following:
Specify the location of an XML Schema (.xsd) file in for the schema-location parameter.
Use "?" (no value) for the schema-location parameter, and specify the DTD location in the DOCTYPE tag of the XML document. READ-XML always validates with an internal DTD if one is specified.
Use "?" for the schema-location parameter when neither an XML Schema file nor a DTD can be used for validation. READ-XML will infer the schema from the XML file itself.