xsd:restriction
I am wondering if someone can help with this rather small issue.
I have and xsd file which gets read and recreated based on changes in data. Following is the snippet
<xsd:simpleType name="stype_abc"> //line 1
<xsd:restriction base="xsd:string"> //line 2
<xsd:enumeration value="xxxxxxx" form:text="xxxxxx" />
...
...
</xsd:restriction>
</xsd:simpleType>
when the code is run which is:
XmlNode restrictionNode = schemaDocument.SelectSingleNode("//xsd:simpleType[@name='stype_abc']/xsd:restriction", nsManager);
restrictionNode.RemoveAll(); // this is removing all existing data under that node.
I get everthing correct except in the new file the line 2 is missing base="xsd:string" which creates some problems. I guess the obviuos question is what code changes I need to make to retain base="xsd:string" so the line 2 look like <xsd:restriction base="xsd:string">
Thanx
|