Hi , I am using XML SPY version5 Professional Edition , evaluation copy in my project development.
I am using anyType as type for some elements.
For this type(anyType) , I can add either
test between the elements or child elements itself.
While validating the xml against the xml schema using jaxb , this is working fine.
But if I validate using XML schema , the XML SPY expects anyType as
string only.
Is there any way from which I can configure within XML SPY so that a user can give anything (both elements and text).
See the following examples:
This xml validates using JAXB. But not in XML SPY.
If I remove the child element<anyelement> and put some text it will validate
XML FILE
<?xml version="1.0" encoding="UTF-8"?>
<testcases xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\Lehman\harness\TestHarnessJava\xsd\Temp.xsd">
<testcase>
<value><anyelement>hjer</anyelement></value>
</testcase>
</testcases>
XSD FILE
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" jxb:version="1.0">
<xsd:element name="testcases">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="testcase" type="testcasetype"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="testcasetype">
<xsd:sequence>
<xsd:element name="value" type="xsd:anyType"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
If anyone has any solutions please let me know