<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2655.35">
<TITLE>Verifier.checkXMLName() - small performance improvement.</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>The following provides a slight, but easy performance gain in this method.</FONT>
</P>
<P><FONT SIZE=2>Existing code:</FONT>
<BR><FONT SIZE=2>...</FONT>
<BR><FONT SIZE=2>for (int i=0, len = name.length(); i<len; i++) {</FONT>
<BR><FONT SIZE=2>...</FONT>
</P>
<BR>
<P><FONT SIZE=2>Replace with:</FONT>
<BR><FONT SIZE=2>for (int i=1, len = name.length(); i<len; i++) {</FONT>
</P>
<BR>
<P><FONT SIZE=2>Reason:</FONT>
</P>
<P><FONT SIZE=2>The first character is already confirmed to be an "isXMLNameStartCharacter", which is a pure subset of the "isXMLNameCharacter" every other letter is checked against.</FONT></P>
<P><FONT SIZE=2>Thus, the first letter of every Element and Attribute name is verified twice.</FONT>
</P>
<P><FONT SIZE=2>Rolf</FONT>
</P>
</BODY>
</HTML>