Show All

# xmlToEdit Element

Specifies an instance of an editing component.

## Type

    xsd:complexType

## Structure

Name | Description
--- | ---
container | (Optional attribute) Specifies an XPath expression that determines the context in which the control will be selectable and its actions enabled.
editWith | (Optional element) Defines an instance of an editing component, and provides the corresponding parameters to determine its exact behavior.
item | (Required attribute) Specifies an XPath expression that determines the XML Document Object Model (DOM) nodes to be edited using the editing component defined in the editWith element.
name | (Required attribute) Used in the xmlToEdit attribute of the button element to associate actions of the associated editing component with buttons defined in menus and toolbars.
viewContext | (Optional attribute) Specifies a string that identifies an HTML element in the view.

## Remarks

The xmlToEdit element is an optional element of the editing element.

xmlToEdit elements are used to define the editing components that can be used in a form. The xmlToEdit elements can contain multiple editWith elements that specify the editing components that will be used to edit various types of XML DOM nodes.

## Example

The following is an example of the xmlToEdit element:

    <xsf:editing>
       <xsf:xmlToEdit name="CD_10"
          item="/CustomUISample/CDCollection/CD"
          container="/CustomUISample">
          <xsf:editWith caption="CD"
             xd:autogeneration="template"
             component="xCollection">
             <xsf:fragmentToInsert>
                <xsf:chooseFragment parent="CDCollection">
                   <CD>
                      <Title></Title>
                      <Artist></Artist>
                      <Tracks>
                         <Track></Track>
                         <Track></Track>
                      </Tracks>
                   </CD>
                </xsf:chooseFragment>
             </xsf:fragmentToInsert>
          </xsf:editWith>
       </xsf:xmlToEdit>
    </xsf:editing>

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp