📄 a00016.html
字号:
<table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">IMPORT_C static <a class="el" href="../../d7/d7a/a00016.html">CSyParser</a> * CSyParser::NewL </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const TDesC & </td> <td class="mdname1" valign="top" nowrap> <em>aEncoding</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Intended Usage: Standardized safe construction which leaves nothing on the cleanup stack. <p>Constructs a new parser and namespace processor. Element type names and attribute names that belong to a namespace will be expanded; unprefixed attribute names are never expanded; unprefixed element type names are expanded only if there is a default namespace. The expanded name is the concatenation of the namespace URI, the namespace separator character, and the local part of the name. If the namespace separator is a null char then the namespace URI and the local part will be concatenated without any separator. When a namespace is not declared, the name and prefix will be passed through without expansion. <dl compact><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>KErrNoMemory.</em> </td><td></td></tr> </table></dl><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>aEncoding</em> </td><td>The encoding of the data to be parsed, this will override the definitions in the XML file or byte headers. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>CExpatParserBase* A pointer to the newly created class. </dd></dl><dl compact><dt><b>Precondition:</b></dt><dd>None </dd></dl><dl compact><dt><b>Postcondition:</b></dt><dd>Nothing is left on the CleanupStack </dd></dl> </td> </tr></table><a class="anchor" name="CSyParsere1" doxytag="CSyParser::NewLC"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">IMPORT_C static <a class="el" href="../../d7/d7a/a00016.html">CSyParser</a> * CSyParser::NewLC </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const TDesC & </td> <td class="mdname1" valign="top" nowrap> <em>aEncoding</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Intended Usage : Two phase constructor which leaves a CExpatParserBase* on the cleanup stack Constructs a new parser and namespace processor. <p>Element type names and attribute names that belong to a namespace will be expanded; unprefixed attribute names are never expanded; unprefixed element type names are expanded only if there is a default namespace. The expanded name is the concatenation of the namespace URI, the namespace separator character, and the local part of the name. If the namespace separator is a null char then the namespace URI and the local part will be concatenated without any separator. When a namespace is not declared, the name and prefix will be passed through without expansion. Error Condition : Leave with an error code <dl compact><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>KErrNoMemory.</em> </td><td></td></tr> </table></dl><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>aEncoding</em> </td><td>The encoding of the data to be parsed, this will override the definitions in the XML file or byte headers. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>CExpatParserBase* A pointer to the newly created class. </dd></dl><dl compact><dt><b>Precondition:</b></dt><dd>None </dd></dl><dl compact><dt><b>Postcondition:</b></dt><dd>A <a class="el" href="../../df/d86/a00012.html">CExpatParserBase</a> is on the CleanupStack </dd></dl> </td> </tr></table><a class="anchor" name="CSyParserf0" doxytag="CSyParser::Panic"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void CExpatParserBase::Panic </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const TInt </td> <td class="mdname1" valign="top" nowrap> <em>aPanic</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [static, protected, inherited]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Intended Usage : Helper function to generate a panic. <p>Note that this function is not expected to return as it always leaves. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>aPanic</em> </td><td>the panic code for the error </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>none </dd></dl><dl compact><dt><b>Precondition:</b></dt><dd>First phase of construction is complete. </dd></dl><dl compact><dt><b>Postcondition:</b></dt><dd>Never returns, only leaves!. </dd></dl> </td> </tr></table><a class="anchor" name="CSyParsera2" doxytag="CSyParser::Parse"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="../../d7/de0/a00022.html#a40">TSyExpatStatus</a> CExpatParserBase::Parse </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const TPtrC8 </td> <td class="mdname" nowrap> <em>aBuffer</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const TBool </td> <td class="mdname" nowrap> <em>aIsFinal</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [inherited]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Intended Usage: Parses a block of memory held in the buffer. <p>Parses some input. Returns TExpatStatusError if a fatal error is detected. The last call to Parse must have aIsFinal true; The buffer may be a zero length. <dl compact><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>none.</em> </td><td></td></tr> </table></dl><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>aBuffer</em> </td><td>Pointer to a block of memory holding the data to be parsed. </td></tr> <tr><td valign="top"></td><td valign="top"><em>aIsFinal</em> </td><td>Set to ETrue if this buffer is the last buffer to be parsed. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>Either TExpatStatusOk if the buffer was successfully parsed, error otherwise. </dd></dl><dl compact><dt><b>Precondition:</b></dt><dd>none </dd></dl><dl compact><dt><b>Postcondition:</b></dt><dd>Nothing is left on the CleanupStack. </dd></dl> </td> </tr></table><a class="anchor" name="CSyParsera3" doxytag="CSyParser::ParseBuffer"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="../../d7/de0/a00022.html#a40">TSyExpatStatus</a> CExpatParserBase::ParseBuffer </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const TInt </td> <td class="mdname" nowrap> <em>aLength</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const TBool </td> <td class="mdname" nowrap> <em>aIsFinal</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [inherited]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Intended Usage: Parses a block of memory held in the internal buffer. <p>Parses some input. Returns TExpatStatus if a fatal error is detected. The last call to Parse must have aIsFinal true; The buffer may be a zero length. <dl compact><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>none.</em> </td><td></td></tr> </table></dl><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>aLength</em> </td><td>the length of the internal buffer to parse </td></tr> <tr><td valign="top"></td><td valign="top"><em>aIsFinal</em> </td><td>ETrue if this is the last portion of the internal buffer to parse. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>Either TExpatStatusOk if the buffer was successfully parsed, error otherwise. </dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="../../df/d86/a00012.html#CSyParsera4">GetBuffer</a>. </dd></dl><dl compact><dt><b>Precondition:</b></dt><dd>The parser state is not suspended and it is not in finished state. </dd></dl><dl compact><dt><b>Postcondition:</b></dt><dd>Nothing is left on the CleanupStack. </dd></dl> </td> </tr></table><a class="anchor" name="CSyParsera1" doxytag="CSyParser::Reset"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">TBool CExpatParserBase::Reset </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const TDesC & </td> <td class="mdname1" valign="top" nowrap> <em>aEncoding</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inherited]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Intended Usage: Prepare a parser object to be re-used. <p>This is particularly valuable when memory allocation overhead is disproportionatly high, such as when a large number of small documents need to be parsed. All handlers are cleared from the parser, except for the unknownEncodingHandler. The parser's external state is re-initialized except for the values of ns and ns_triplets. . <dl compact><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>none.</em> </td><td></td></tr> </table></dl><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>aEncoding</em> </td><td>The default encoding to use when parsing new input </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>ETrue if the parser was successfully reset </dd></dl><dl compact><dt><b>Precondition:</b></dt><dd>None </dd></dl><dl compact><dt><b>Postcondition:</b></dt><dd>Nothing is left on the CleanupStack </dd></dl>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -