argument Element

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The argument element contains one portion of a condition string. A condition string typically has a condition portion and a value portion. For example, in the condition string "Artist Equals Joe", the condition portion is "Equals" and the value portion is "Joe".

<argument
   name = "string"
>
   string
</argument>
        

Attributes

name (required)

The name of one portion of the condition string.

Parent/Child Elements

Hierarchy Elements
Parent fragment
Child None

Remarks

When the name attribute of a fragment element is a media item characteristic such as Album Artist, or Genre, the fragment element must contain two argument elements: one that specifies a condition and another that specifies a value. The following table shows two possible values for the name attribute and how argument elements are used to specify conditions and values.

Attribute value Description
Condition The content of the argument element is the condition portion of a condition string. For example, in the condition string "Artist Equals Joe", the condition portion is "Equals". The condition portion of a condition string must be one of the following: Equals, Does Not Equal, Contains, Does Not Contain, Is Less Than, Is Greater Than, Is, Is Not, Is Before, Is Later Than, Is More Recent Than, Above, Below, Ascending, Descending, Random, Is At Least, Is No More Than.
Value The content of the argument element is the value portion of a condition string. For example, in the condition string "Artist Equals Joe", the value portion is "Joe".Example:
\<fragment name = "Artist">
  <argument name = "Condition">Equals</argument>
  <argument name = "Value">Joe</argument>
</fragment>

When the name attribute of a fragment element is "Limit Total Size To" or "Limit Total Duration To", the fragment element must contain two argument elements: one that specifies a format and one that specifies a number. The following table shows two possible values for the name attribute and how argument elements are used to limit the size or duration of a playlist.

Attribute value Description
Format When the name attribute of the fragment element is "Limit Total Size To", the content of the argument element must be one of the following: Kilobytes, Megabytes, or Gigabytes.When the name attribute of the fragment element is "Limit Total Duration To", the content of the argument element must be one of the following: Seconds, Minutes, Hours, or Days.
Number The content of the argument element is a number that limits the size or duration of the playlist.Examples:
\<fragment name = "Limit Total Size To">
  <argument name = "Format">Megabytes</argument>
  <argument name = "Number">5</argument>
</fragment>

<fragment name = "Limit Total Duration To"> <argument name = "Format">Minutes</argument> <argument name = "Number">20</argument> </fragment>

When the name attribute of a fragment element is "Limit Number of Items", the fragment element must contain one argument element that specifies the number of items. The following table shows how to use the Number value of the name attribute.

Attribute value Description
Number The content of the argument element is a number that limits the number of items in a playlist.Example:
\<fragment name = "Limit Number of Items">
  <argument name = "Number">15</argument>
</fragment>

Requirements

Requirement Value
Version
Windows Media Player 9 Series or later.

See also

fragment Element

Windows Media Playlist Elements Reference