Unhandled System.NullReferenceException in XML Editor
hi all,
when editing xml document based on particular set of schemas, keep getting following in errors tab:
unhandled 'system.nullreferenceexception' in xml editor
object reference not set instance of object
things going fine until did inheritance in 1 of schemas in set (complextype has complexcontent extends complextype)... seems i'm toast.
the problem occurs when open xml document based on schema. opening other documents based on other schemas in set works fine...
any ideas?
thanks
james
sorry lack of details in original post... here minimal example. posted connect...
----------------------------------
steps reproduce:
- add xsd , xml project
- open project
- open xml document, produces exception
------------------------------------------
vvvvvvvvvvvvvvvv test.xsd vvvvvvvvvvvvvvvv
<?xml version="1.0" encoding="utf-8" ?>
<xschema xmlns:xs="http://www.w3.org/2001/xmlschema"
targetnamespace="test"
xmlns="test"
elementformdefault="qualified">
<xsimpletype name="st1">
<xs:restriction base="xstring">
<xs:enumeration value="hi"/>
<xs:enumeration value="there"/>
</xs:restriction>
</xsimpletype>
<xs:complextype name="ct1">
<xsimplecontent>
<xs:extension base="xstring">
<xs:attribute name="ct1a1" use="required" type="st1"/>
</xs:extension>
</xsimplecontent>
</xs:complextype>
<xs:complextype name="ct2">
<xs:complexcontent>
<xs:extension base="ct1" >
</xs:extension>
</xs:complexcontent>
</xs:complextype>
<xs:element name="node" type="ct2"/>
</xschema>
^^^^^^^^^^^^^ test1.xsd ^^^^^^^^^^^^^^^^^^
------------------------------------------
------------------------------------------
vvvvvvvvvvvvvvvv t1.xml vvvvvvvvvvvvvvvv
<node xmlns="test">
</node>
^^^^^^^^^^^^^ t1.xsd ^^^^^^^^^^^^^^^^^^
------------------------------------------
Archived Forums V > Visual C# IDE
Comments
Post a Comment