CharacterPosition (XmlParseError property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (match syntax table to syntax template, tags and edits)
Line 1: Line 1:
{{Template:XmlParseError:CharacterPosition subtitle}}
{{Template:XmlParseError:CharacterPosition subtitle}}
This readOnly property returns a number that indicates the position within the input character stream (starting with 1) at or before which the error was detected.


==Syntax==
==Syntax==
Line 5: Line 6:
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%num</th>
<tr><th>%number</th>
<td>The position at or before which the error was detected.</td></tr>
<td>The position at or before which the error was detected.</td></tr>
<tr><th>%xmlParsErr</th>
<tr><th>xmlParsError</th>
<td>A reference to an instance of an XmlParseError object.
<td>A reference to an instance of an <var>[[XmlParseError_class|XmlParseError]]</var> object.
</td></tr>
</td></tr>
</table>
</table>
Line 14: Line 15:
==Usage notes==
==Usage notes==
<ul>
<ul>
<li>The number of bytes that constitute a character depends on the type of string
<li>The number of bytes that constitute a character depends on the type of string that causes the exception:
that causes the exception:
<ul>
<ul>
<li>If EBCDIC, one byte corresponds to one character.
<li>If EBCDIC, one byte corresponds to one character.
<li>If Unicode, two bytes correspond to one character.
<li>If Unicode, two bytes correspond to one character.
<li>If UTF-16, two bytes correspond to one character.
<li>If UTF-16, two bytes correspond to one character.
<li>If UTF-8, the relationship between bytes and characters is
<li>If UTF-8, the relationship between bytes and characters is variable, depending on the code points.
variable, depending on the code points.
</ul>
</ul>
</ul>
</ul>
==See also==
==See also==
{{Template:XmlParseError:CharacterPosition footer}}
{{Template:XmlParseError:CharacterPosition footer}}

Revision as of 12:18, 24 April 2011

Position of character at of before which the error occurred (XmlParseError class) This readOnly property returns a number that indicates the position within the input character stream (starting with 1) at or before which the error was detected.

Syntax

%number = xmlParseError:CharacterPosition

Syntax terms

%number The position at or before which the error was detected.
xmlParsError A reference to an instance of an XmlParseError object.

Usage notes

  • The number of bytes that constitute a character depends on the type of string that causes the exception:
    • If EBCDIC, one byte corresponds to one character.
    • If Unicode, two bytes correspond to one character.
    • If UTF-16, two bytes correspond to one character.
    • If UTF-8, the relationship between bytes and characters is variable, depending on the code points.

See also