java - Cannot find the declaration of the element 'diops' -
i'm new on xml stuff, , i'm having 1 issue location of element diops.
here xml
<diops xmlns:ans="ttp://dados.wsh.com.br/diopsxml-2016/xsd/2016/xsd/2016" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://dados.wsh.com.br/diopsxml-2016/xsd/2016 diops2016.xsd">
and here xsd
<xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/xmlschema" xmlns:tns="http://www.ans.gov.br/ws/diops/financeiro/schema/v2016" elementformdefault="qualified" targetnamespace="http://www.ans.gov.br/ws/diops/financeiro/schema/v2016" version="1.1"> <xs:include schemalocation="diopscomplextypes2016.xsd"/> <xs:element name="diops"> <xs:complextype> <xs:sequence> <xs:element ref="tns:identificacao"/> <xs:element name="financeiro" type="tns:financeiro"/> </xs:sequence> </xs:complextype> </xs:element> </xs:schema>
the message appear me is: "cannot find declaration of element 'diops'.
but first element declare in xsd file, other elements dont have issue, element called 'diops'.
sorry poor english.
i guess you're trying validate yout xml document against schema.
anyways, schema defines <diops>
element in http://www.ans.gov.br/ws/diops/financeiro/schema/v2016
namespace (that's targetnamespace attribute does). however, in xml document, <diops>
element belongs empty namespace.
you should add namespace declaration in xml document:
<diops xmlns="http://www.ans.gov.br/ws/diops/financeiro/schema/v2016" ... >
Comments
Post a Comment