# fragmentToInsert Element

Contains alternate versions of XML data (fragments).

## Type

    xsd:complexType

## Structure

Name | Description
--- | ---
chooseFragment | (Required element) Specifies an XML fragment.

## Remarks

The fragmentToInsert element is an optional element of the editWith element.

XML fragments are sources of XML data that can be used within an associated editing component. More than one chooseFragment element can be defined within a fragmentToInsert element.

The fragmentToInsert element is used by the xCollection, xOptional, and xReplace editing components.

## Example

The following is an example of the fragmentToInsert 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