IsValidString (XmlDoc function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<span style="font-size:120%; color:black"><b>Valid XML Element/Attribute value?</b></span>
<span style="font-size:120%; color:black"><b>Valid XML Element/Attribute value?</b></span>
[[Category:XmlDoc methods|IsValidString obsolete shared function]]
 
[[Category:XmlDoc API methods]]
<!--DPL?? Category:XmlDoc methods|IsValidString obsolete shared function: Valid XML Element/Attribute value?-->
<!--DPL?? Category:XmlDoc methods|IsValidString obsolete shared function: Valid XML Element/Attribute value?-->
<!--DPL?? Category:XmlDoc API methods|IsValidString (obsolete shared XmlDoc function): Valid XML Element/Attribute value?-->
<!--DPL?? Category:XmlDoc API methods|IsValidString (obsolete shared XmlDoc function): Valid XML Element/Attribute value?-->
Line 65: Line 64:
<li><var>IsValidString</var> has no request cancellation errors.
<li><var>IsValidString</var> has no request cancellation errors.
</ul>
</ul>
[[Category:XmlDoc methods|IsValidString obsolete shared function]]
[[Category:XmlDoc API methods]]

Latest revision as of 00:04, 3 September 2014

Valid XML Element/Attribute value?

IsValidString is a member of the XmlDoc class.

This shared function determines whether a string value is a valid XML Element or Attribute value. Designed to be used prior to updating an XmlDoc, this function was new as of version 6.8 of Sirius Mods and deprecated in favor of InvalidCharacterPosition in version 7.0.

Syntax

%bool = %(XmlDoc):IsValidString(value)

Syntax Terms

%bool A declared enumeration object of type Boolean to contain the returned value

(True or False) of IsValidString.

For more information about enumerations, see Enumerations.
%(XmlDoc) The class name in parentheses denotes a shared method;

you may instead provide an XmlDoc object expression (for example, a %variable).

For more information about shared methods, see ?? refid=shared..
value The input string whose characters are to be validated.

As of Sirius Mods version 7.6, this may be a Unicode string or an EBCDIC string.

Formerly, only EBCDIC was allowed.

Usage Notes

  • IsValidString returns True if its argument string is:
    • Unicode, and all characters are legal in an Element or Attribute value (that is, it does not contain any null characters).
    • EBCDIC, and all characters are translatable to Unicode characters other than the null character.

    Otherwise, it returns False.

    Prior to Sirius Mods 7.6, the invalid characters of an Element or Attribute node were the EBCDIC "control characters."

  • If the result of the IsValidString call is True:
    • The AddAttribute, AddElement, AddText, InsertTextBefore, and InsertElementBefore functions may use the value string as their second argument.
    • The Value property of an Element, Attribute, or Text node may use the value string as the right side of an assignment (subject to restrictions on null strings).

Request-Cancellation Errors

  • IsValidString has no request cancellation errors.