Martin Ch
Martin Ch

Reputation: 1367

Xsd documentation value

how can I create xsd documentation programatically? Example:

<xs:annotation>
<xs:documentation>Documentation</xs:documentation>
</xs:annotation>

I used:

 XmlSchemaElement element = new XmlSchemaElement();
    XmlSchemaAnnotation annotation = new XmlSchemaAnnotation();
    XmlSchemaDocumentation doc = new XmlSchemaDocumentation();

    //doc.Value = "Documentation"; ??
    annotation.Items.Add(doc);
    element.Annotation = annotation;

but how do I set documentation value? There is no such property in XmlSchemaDocumentation type. Thanks!

Upvotes: 0

Views: 627

Answers (1)

CuccoChaser
CuccoChaser

Reputation: 1079

I think you are missing a small thing, like

annotation.Items.Add(doc);
doc.Markup = TextToNodeArray("Your text you need");

could you try this and see what if this helps any?

refer otherwise to http://msdn.microsoft.com/en-us/library/system.xml.schema.xmlschemadocumentation.aspx which should give you pretty nice examples otherwise how to work with it.

Upvotes: 1

Related Questions