# User-Defined Measurement Configuration (XML) File

The XML file defines a user measurement and the file can be created using an ASCII editor, such as Notepad++. The following "clickable" list shows all valid XML elements. Be aware that XML is case sensitive. All content in the XML file must be enclosed by an element. Each element must begin with an opening tag and end with a closing tag. Opening tags are enclosed in < > characters, for example, <Name>. Closing tags are enclosed in </ > characters, for example </Name>. The root element is <Measurement>, and it is a required element. The file ends with the </Measurement> closing tag. Line indentation indicates element hierarchy, but is not required in your file. The indentation shows that the <Dependent> element is the child of the <Measurement> element and the parent of the <SourceIndex> element. In the following list, click on the elements to learn about their use. Many of the XML elements for user measurements are the same or similar to those used in defining user function XML files. The only elements that are required to create a valid file are `<Measurement>` and `<Script>`. All other elements are optional. The <Script> element identifies your script.

Click on these elements!

<Measurement>(required element) <Name>content</Name> <Abbreviation>content</Abbreviation> <Comments>content</Comments> <Script>content</Script>(required element) <ValidType>content</ValidType> <Icon>content</Icon> <MeasurementType>content</MeasurementType> <Variable attribute attribute /> <Dependent attribute > <SourceIndex>content</SourceIndex> </Dependent> </Measurement>

Although all the XML elements except for <Measurement> and <Script> are optional, you would seldom create an XML file without optional elements as you would lose all of the powerful features that are available. However, you can just directly select the Matlab or Python script file in the User Measurement Setup dialog box.

## XML Example File

<Measurement> <Script>EyeMeasurement.py</Script> <Name>My Eye Measurement</Name> <Abbreviation>MyEye</Abbreviation> <Comments>Before starting the measurement: - Use ESD precautions! - Use only approved cables. - Warm up the DUT. </Comments> <Icon>EyeMeasBtn.png</Icon> <ValidType>Eye</ValidType> <Icon>EyeMeasBtn.png</Icon> <MeasurementType>2</MeasurementType> <Variable Name="Frequency" Value="10.125e9" /> <Dependent Name = "Rise Time"> <!-- Eye Rise Time measurement. --> <SourceIndex>2</SourceIndex> <!-- Measure source waveform 2. --> </Dependent> </Measurement>

## Comments

You can add comments to your XML files using the <!-- and --> delimiters as shown here. Comments can be on their own line, at the end of a line, or extend over several lines.

    <!-- This is my comment! -->