Validating xml against xml schema while updating my iphone froze
I have registered the schema using: l_xsd xmltype; -- contains the schema dbms_xmlschema.registerschema('puk_query_response.xsd', l_xsd, TRUE, TRUE, FALSE, FALSE); but when I try: l_xml xmltype; -- contains the xml to be validated l_schema_valid := l_xml.isschemavalid('puk_query_response.xsd'); it always fails.
I have tried this successfully with XML that had a namespace and an XSD that had a target namespace.
(To learn more about XML Schema, you can review the online tutorial, .
You can also examine the sample programs that are part of the JAXP download.
You also set a factory attribute to specify the parser language to use.
(For SAX parsing, on the other hand, you set a property on the parser generated by the factory.) Now that the program is ready to validate with an XML Schema definition, it is necessary only to ensure that the XML document is associated with (at least) one.
By default, the database checks to ensure that instances are well-formed.
I have looked at many posts to see how to use the XML validating reader (Now just XMLReader. The data validates 100% using XML Spy from Altova but not using the XMLReader in C#. The error that occurs trying to find the type String20, which is my first custom data type in my schema.
I dont want to use default namespaces, I want my own. I know this is possible and validates ok (in XML Spy). So I think its either a namespace issue or something I may be doing wrong in the validation in c# code. Sample data is a small subset of my real data (cannot post real data). --- XML data --- If you have two schemas with different target namespaces then it does not make sense (in my understanding) to include one schema in the other, rather you need to import the schema with xs:import.
And then you will need to use qualified names (i.e with a prefix) to refer to a type from the imported schema. Add(null, schema File); Any imports/includes will be done automatically.
As for your C# code, it would suffice to simply add the main schema with e.g. (Validate ok in XML Spy, not c#) I'm not sure how to get a relative import path to work without parsing the and modyfying the import line to give it the hardcoded path required at runtime.This is useful when we have an XML schema which defines more than one top level element, and we want to check conformance against a specific one of these elements.