Udostępnij za pośrednictwem


XmlKeyConstraint Collection Editor Dialog Box

Allows you to add or remove <key> and <unique> elements to the current XML Schema. The XmlKeyConstraint Collection Editor appears when you are using the Properties window and click the ellipsis button next to the key property of an XML Schema.

  • Members
    Lists all <key> and <unique> elements in the current collection.

  • Properties
    Lists the individual properties of the element selected in the Members area.

    • ConstraintName (optional) - the value of the ConstraintName attribute.

    • PrimaryKey (required) - true if this constraint is the primary key in the dataset.

    • fields (required) - the collection of columns that participate in this constraint.

      Note

      The fields collection requires at least one item.

    • id (optional) - the identifier of this constraint. This must be a unique ID for this document. The id must be of type id.

    • name (required) - the value of the name attribute for this constraint.

    • nullable (read only) - true if this constraint allows null values. This value is set when adding a new constraint to the collection.

    • selector - the XPath expression that points to the element that is managed by this constraint.

  • Add
    Adds a new <key> or <unique> element to the collection.

  • Remove
    Deletes the selected element from the collection.

See Also

Other Resources

XML Schemas (XSD) Reference

XML Tools in Visual Studio

XML Documents and Data