2.2.4.2 wpv2:WebPart
The WebPart element specifies a Web Part.
A Web Part describes a type in an object-oriented system that is derived from a type that represents a control. As in all types in object-oriented systems, it can contain sub-objects of types in the object-oriented system. The DWP format encompasses the serialization of a Web Part as XML. The contained sub-objects of the Web Part are also serialized. This element is defined as follows:
-
<s:schema targetNamespace="http://schemas.microsoft.com/WebPart/v2" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:wpv2="http://schemas.microsoft.com/WebPart/v2" elementFormDefault="qualified"> <s:element name="WebPart"> <s:complexType> <s:sequence minOccurs="2" maxOccurs="unbounded"> <s:any namespace="##any" minOccurs="0" maxOccurs="unbounded" /> </s:sequence> <s:attribute name="ID" type="s:string" use="optional" /> <s:anyAttribute namespace="##any"/> </s:complexType> </s:element> </s:schema>
WebPart: The presence of this element specifies the existence of the Web Part.
WebPart.ID: The identifier of the Web Part. It MUST be unique in a single page.
WebPart.*: Each of these elements represents one sub-object of the Web Part. If the server can represent the type of the sub-object in a single text value, this element contains exactly one child node, which MUST be a text node. If the server is unable to represent the type as a single string, this element has sub-elements that represent sub-objects of the sub-object. The nesting of these nodes is permitted. Two elements, WebPart.Assembly and WebPart.TypeName, have particular meaning, as specified later.
WebPart.Assembly: The text node child of this element specifies the binary file on the front-end web server that contains the type definition in the object-oriented system for the Web Part.
WebPart.TypeName: The text node child of this element specifies the name of the type in the object-oriented system.
WebPart.*: Each of these attributes is an additional attribute on the WebPart tag. The meaning of these attributes is implementation-specific.<9>