Adobe.com
Contents Suites Classes Class Index Member Index

AIXMLNameUtilSuite Struct Reference
[API Suite List]

This suite allows you to create and manipulate XML names, and convert them to and from strings. More...

#include <AIXMLNameUtil.h>

List of all members.

Public Attributes

AIAPI AIErr(* NameFromBaseAndNumber )(const ai::UnicodeString &base, ai::UnicodeString &buffer, ai::int32 number, ai::int32 maxlength)
 Constructs an XML name from a base name, appending a number to make the name unique.
AIAPI AIErr(* BaseFromName )(const ai::UnicodeString &name, ai::UnicodeString &buffer)
 Retrieves the base name from an XML name, stripping off any number that was appended to make the name unique.
AIAPI AIBoolean(* IsValidName )(const ai::UnicodeString &name)
 Reports whether a string contains a valid XML name.
AIAPI AIErr(* XMLNameFromString )(const ai::UnicodeString &str, ai::UnicodeString &buffer)
 Constructs a valid XML name from any Unicode string, by replacing spaces with underscores and other illegal characters with a character sequence that identifies their hexadecimal equivalent.
AIAPI AIErr(* StringFromXMLName )(const ai::UnicodeString &name, ai::UnicodeString &buffer)
 Restores a valid XML name to the Unicode string from which it was created using XMLNameFromString().

Detailed Description

This suite allows you to create and manipulate XML names, and convert them to and from strings.

An XML name must conform to a specific syntax; for example, it cannot contain the space character and must start with a letter. See http://www.w3.org/TR/REC-xml#NT-Name for the XML name syntax.

Illustrator uses these functions to convert between art object names and unique identifiers; see the AIUIDUtilsSuite.


Member Data Documentation

Retrieves the base name from an XML name, stripping off any number that was appended to make the name unique.

Parameters:
name The XML name.
buffer [out] A Unicode string in which to return the base name.

Reports whether a string contains a valid XML name.

(Note that this function returns a boolean value, not an error code.)

Parameters:
name The Unicode string.
Returns:
True if the string contains a valid XML name.
AIAPI AIErr(* AIXMLNameUtilSuite::NameFromBaseAndNumber)(const ai::UnicodeString &base, ai::UnicodeString &buffer, ai::int32 number, ai::int32 maxlength)

Constructs an XML name from a base name, appending a number to make the name unique.

Parameters:
base The base name string.
buffer [out] A Unicode string in which to return the XML name.
number The number.
maxlength The maximum number of characters in the constructed name.

Restores a valid XML name to the Unicode string from which it was created using XMLNameFromString().

Parameters:
name The XML name.
buffer [out] A buffer in which to return the converted string.

Constructs a valid XML name from any Unicode string, by replacing spaces with underscores and other illegal characters with a character sequence that identifies their hexadecimal equivalent.

For example, "99 red balloons" becomes "_x39_9_red_balloons", because the first character of an XML name cannot be a number.

Parameters:
name The Unicode string.
buffer [out] A Unicode string in which to return the XML name.

The documentation for this struct was generated from the following file:


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2014 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks