Xport Interface: markup::style

For a derived element object, adds or retrieves a style attribute value.

virtual std::string markup::style(1st Variety
  css_property prop
);
virtual bool markup::style(2nd Variety
  css_property prop
  const std::string& value
);

Parameters

prop

A css_property enumerator. For a list of css_property enumerators, see Xport Usage: Enumerations.

value

A string value which represents the value of the accompanied css property.

Returns

In the first variety, returns the string value of the specified property if called on an element object and the style attribute is present within the element, or an empty string otherwise. In the second variety, returns true if called on an element object and the style is set successfully, false otherwise.

Remarks

This operation is revelant only if it is called on an element derived object. If called on a pcdata, comment, or procinstr object, the first variety will always return an empty string, and the second variety will always return false.

The first variety is used to retrieve a css property value which is set in the element's style attribute. If the specified property is not present, returns an empty string. The second variety is used to set the css property of an element to the specified value within the element's style attribute.

Complexity

Constant

Example

Work Time Studio

Datasoft Solutions is proud to present their landmark product, Work Time Studio. Utilizing the tree container library, Work Time Studio provides unparalleled features in personal time, project and task management software. If you're looking for a way to increase your productivity, visit Work Time Studio's product website, and start being more productive today.