大网数据广告活动
打印与设备

Value

· 52CE 我爱测

Learn about the Value element, which associates a literal with a type. The data type of Value must be string, integer, decimal, or QName.

This topic is not current. For the most current information, see the Print Schema Specification.

A Value element associates a literal with a type.

Element Tag

<Value>

XML Attributes

The following table lists the XML attributes that may be pertain to this element.

XML Attribute Details
xsi:type Specifies the data type of Value, which must be one of the following XSD-defined types: string, integer, decimal, QName. If missing, the default data type is string.

For more information, please see XML Attributes section.

Element Information

The following table lists the elements that may be parents of this element, the elements that may be children of this element, and any restrictions on the element itself.

Category Details
Parent elements ParameterInit Property ScoredProperty
Child elements Only character or integer content is permitted.
This element Null content is allowed. Character content must conform to syntax defined by data type. Duplicate child siblings are not permitted.

Configuration Dependencies

Value elements that appear within ScoredProperty element may not have any configuration dependencies. Value elements that appear within Property elements may have arbitrary dependencies on the configuration.

Element Usage

A Value element may appear within a Property or ScoredProperty element. The purpose of the Value element is to represent a value as a standard XML data type. The data type is specified as an XML attribute of the Value element, xsi:type. Note that not all XSD-defined or XML-defined types are supported. For a list of supported types, see Summary of Element Types. A Value element can contain only character content. Nothing else may appear as content in a Value element.

Note:
Some Print Schema-defined Property and ScoredProperty elements do not contain a Value element, because their purpose is simply to be parents of subproperties. You should not add a Value element to such properties as these, properties that do not contain a Value element.

To conform to the Print Schema Framework, which requires either a Value element or subelements be present in the elements that support values, an absent or undefined value should be represented by presenting the Value element as an empty element; that is, as <Value></Value>.

Example

Define a Value of type decimal and initialize it to "128.5".

<Value xsi:type="decimal">128.5</Value>

Related topics

Print Schema Specification

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。