Lines Matching full:code
62 <code>XML::Parser</code>, Python's <code>xml.parsers.expat</code>, and
209 <dt><code><a href= "#XML_ParserCreate"
210 >XML_ParserCreate</a></code></dt>
213 <dt><code><a href= "#XML_SetElementHandler"
214 >XML_SetElementHandler</a></code></dt>
217 <dt><code><a href= "#XML_SetCharacterDataHandler"
218 >XML_SetCharacterDataHandler</a></code></dt>
221 <dt><code><a href= "#XML_Parse"
222 >XML_Parse</a></code></dt>
238 information. Finally it increments the global <code>Depth</code>
263 <code>Depth</code>.</p>
271 <p>Note the <code>XMLCALL</code> annotation used for the callbacks.
274 itself and the client code are different. Expat tries not to care
277 For code which uses Expat, however, the calling convention is
278 specified by the <code>XMLCALL</code> annotation on most platforms;
281 <p>The <code>XMLCALL</code> annotation was added in Expat 1.95.7, but
320 you can use CMake to generate a <code>.sln</code> file, e.g.
321 <code>
323 </code>, and build Expat using <code>msbuild /m expat.sln</code> after.</p>
344 only one we'll mention here is the <code>--prefix</code> option. You
346 the <code>--help</code> option.</p>
349 gets installed in <code>/usr/local/lib</code> and the associated
350 header file in <code>/usr/local/include</code>. But if you were to
351 give the option, <code>--prefix=/home/me/mystuff</code>, then the
353 <code>/home/me/mystuff/lib</code> and
354 <code>/home/me/mystuff/include</code> respectively.</p>
367 (syntax <code>&e1;</code> to reference and
368 syntax <code><!ENTITY e1 'value1'></code> (an internal general entity) or
369 <code><!ENTITY e2 SYSTEM 'file2'></code> (an external general entity) to declare).
370 With <code>XML_GE</code> enabled, general entities will be replaced by their declared replacement text;
372 <code><a href="#XML_SetExternalEntityRefHandler">XML_ExternalEntityRefHandler</a></code> must be set using
373 <code><a href="#XML_SetExternalEntityRefHandler">XML_SetExternalEntityRefHandler</a></code>.
374 Also, enabling <code>XML_GE</code> makes
375 the functions <code><a href="#XML_SetBillionLaughsAttackProtectionMaximumAmplification">
376 XML_SetBillionLaughsAttackProtectionMaximumAmplification</a></code> and <code>
378 XML_SetBillionLaughsAttackProtectionActivationThreshold</a></code> available.
380 With <code>XML_GE</code> disabled, Expat has a smaller memory footprint and can be faster, but will
383 <code>amp</code>, <code>apos</code>, <code>gt</code>, <code>lt</code>, <code>quot</code>)
385 for example, referencing an entity <code>e1</code> via <code>&e1;</code> will be replaced
386 by text <code>&e1;</code>.
396 the functions <code><a
398 XML_SetBillionLaughsAttackProtectionMaximumAmplification</a></code> and <code>
400 XML_SetBillionLaughsAttackProtectionActivationThreshold</a></code> available.</dd>
410 <code>XML_Char</code>. This is implied if
411 <code>XML_UNICODE_WCHAR_T</code> is defined.</dd>
414 <dd>If defined, causes the <code>XML_Char</code> character type to be
415 defined using the <code>wchar_t</code> type; otherwise, <code>unsigned
416 short</code> is used. Defining this implies
417 <code>XML_UNICODE</code>.</dd>
420 <dd>If defined, causes the <code>XML_Size</code> and <code>XML_Index</code>
423 <code><a href="#XML_GetCurrentByteIndex" >XML_GetCurrentByteIndex</a></code>,
424 <code><a href="#XML_GetCurrentLineNumber" >XML_GetCurrentLineNumber</a></code> and
425 <code><a href="#XML_GetCurrentColumnNumber" >XML_GetCurrentColumnNumber</a></code>
431 ensure are available for reporting via <code><a href=
432 "#XML_GetInputContext" >XML_GetInputContext</a></code>. This is
434 If this is set to zero, the input context will not be available and <code><a
435 href= "#XML_GetInputContext" >XML_GetInputContext</a></code> will
436 always report <code>NULL</code>. Without this, Expat has a smaller memory
441 statically with the code that calls it; this is required to get all
446 <dd>If defined, makes the additional function <code><a href=
447 "#XML_GetAttributeInfo" >XML_GetAttributeInfo</a></code> available
458 is to include the Expat header (<code>#include <expat.h></code>)
461 usually be done with the <code>-lexpat</code> argument. Otherwise,
478 <p>If you installed Expat in, say, <code>/home/me/mystuff</code>, then
491 <code>LD_LIBRARY_PATH</code> to <code>/home/me/mystuff/lib</code> (or
492 to <code>${LD_LIBRARY_PATH}:/home/me/mystuff/lib</code> if
501 parser object. However, only two of these (<code><a href=
502 "#XML_ParserCreate" >XML_ParserCreate</a></code> and <code><a href=
503 "#XML_ParserCreateNS" >XML_ParserCreateNS</a></code>) can be used for
507 memory associated with this object you must call <code><a href=
508 "#XML_ParserFree" >XML_ParserFree</a></code>. Note that if you have
511 calling <code>XML_ParserFree</code>.</p>
584 incremented depth <em>after</em> the main body of start tag code, then
594 the shared variables. You can then tell Expat (with the <code><a href=
595 "#XML_SetUserData" >XML_SetUserData</a></code> function) to pass a
599 <code>userData</code> and have type <code>void *</code> if the user
600 data is passed; it will have the type <code>XML_Parser</code> if the
602 be retrieved using <code><a href="#XML_GetUserData"
603 >XML_GetUserData</a></code>.</p>
607 content passed to the character data handler (set by <code><a href=
609 >XML_SetCharacterDataHandler</a></code>) needs to be accumulated. A
625 the value of the <code>version</code> pseudo-attribute in the XML
629 alternate processing), it should use the <code><a href=
630 "#XML_SetXmlDeclHandler" >XML_SetXmlDeclHandler</a></code> function to
633 version number of <code>"1.0"</code> is accepted:</p>
664 <p>When the parser is created using the <code><a href=
665 "#XML_ParserCreateNS" >XML_ParserCreateNS</a></code>, function, Expat
667 consumes <code>xmlns</code> and <code>xmlns:...</code> attributes,
673 ><code>XML_SetNamespaceDeclHandler</code></a>.</p>
678 separator character (which is the 2nd argument to <code><a href=
679 "#XML_ParserCreateNS" >XML_ParserCreateNS</a></code>), and the local
686 <p>However if <code><a href= "#XML_SetReturnNSTriplet"
687 >XML_SetReturnNSTriplet</a></code> has been called with a non-zero
688 <code>do_nst</code> parameter, then the expanded form for names with
693 for the end of a scope of a declaration with the <code><a href=
694 "#XML_SetNamespaceDeclHandler" >XML_SetNamespaceDeclHandler</a></code>
700 <code>NULL</code>.
701 The URI will be <code>NULL</code> for the case where the default namespace is being
743 to the <code>UnknownEncodingHandler</code>. This handler gets passed
744 the encoding name and a pointer to an <code>XML_Encoding</code> data
746 <code>XML_STATUS_OK</code> if it knows how to deal with the
748 <code>XML_STATUS_ERROR</code>. The handler also gets passed a pointer
753 support by filling in the <code>XML_Encoding</code> structure.
767 <p><code>XML_Encoding</code> contains an array of integers that
774 function pointed at in the <code>XML_Encoding</code> structure. This
788 set no <code>ExternalEntityRefHandler</code>, then external entity
793 it is responsible for creating a subsidiary parser with <code><a href=
795 >XML_ExternalEntityParserCreate</a></code> that will do the job. This
796 returns an instance of <code>XML_Parser</code> that has handlers and
798 use <code><a href= "#XML_Parse" >XML_Parse</a></code> or <code><a
799 href= "#XML_ParseBuffer">XML_ParseBuffer</a></code> calls against this
806 you must call <code><a href= "#XML_SetParamEntityParsing"
807 >XML_SetParamEntityParsing</a></code> with one of the following
810 <dt><code>XML_PARAM_ENTITY_PARSING_NEVER</code></dt>
812 <dt><code>XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE</code></dt>
814 <code>standalone</code> was set to "yes" in the XML declaration.</dd>
815 <dt><code>XML_PARAM_ENTITY_PARSING_ALWAYS</code></dt>
853 the rough structure (in pseudo-code):</p>
877 <p>This C function could be used for the <code>parse_xml</code>
878 function mentioned in the pseudo-code above:</p>
920 <p>The corresponding <code>continue_parsing</code> function is
921 somewhat simpler, since it only need deal with the return code from
922 <code><a href= "#XML_ResumeParser">XML_ResumeParser</a></code>; it can
923 delegate the input handling to the <code>parse_xml</code>
950 become, what have we gained? Very simply, we can now use the <code><a
951 href= "#XML_StopParser" >XML_StopParser</a></code> function to stop
957 <p>To stop parsing from a handler function, use the <code><a href=
958 "#XML_StopParser" >XML_StopParser</a></code> function. This function
979 Construct a new parser. If encoding is non-<code>NULL</code>, it specifies a
1007 in XML. For instance, <code>'\xFF'</code> is not legal in UTF-8, and
1008 <code>'\xFFFF'</code> is not legal in UTF-16. There is a special case when
1009 <em>sep</em> is the null character <code>'\0'</code>: the namespace URI and
1038 specified in <code>ms</code>. If <code>ms</code> is <code>NULL</code>, then use the
1039 standard set of memory management functions. If <code>sep</code> is
1040 non-<code>NULL</code>, then namespace processing is enabled in the created parser
1053 Construct a new <code>XML_Parser</code> object for parsing an external
1080 be used again. After this has been called, <code>parser</code> is
1084 This function may not be used on a parser created using <code><a href=
1086 ></code>; it will return <code>XML_FALSE</code> in that case. Returns
1087 <code>XML_TRUE</code> on success. Your application is responsible for
1093 <p>To state the obvious: the three parsing functions <code><a href=
1094 "#XML_Parse" >XML_Parse</a></code>, <code><a href= "#XML_ParseBuffer">
1095 XML_ParseBuffer</a></code> and <code><a href= "#XML_GetBuffer">
1096 XML_GetBuffer</a></code> must not be called from within a handler
1099 functions from within an <code>XML_ExternalEntityRefHandler</code>,
1101 <code><a href= "#XML_ExternalEntityParserCreate"
1102 >XML_ExternalEntityParserCreate</a></code>.</p>
1104 <p>Note: The <code>len</code> argument passed to these functions
1113 <code><a href="#XML_Parse">XML_Parse</a></code> or
1114 <code><a href="#XML_ParseBuffer">XML_ParseBuffer</a></code> call
1115 with <code>isFinal</code> set to <code>XML_TRUE</code>.</p>
1133 Parse some more of the document. The string <code>s</code> is a buffer
1135 that are part of the document is indicated by <code>len</code>. This means
1136 that <code>s</code> doesn't have to be null-terminated. It also means that
1137 if <code>len</code> is larger than the number of bytes in the block of
1138 memory that <code>s</code> points at, then a memory fault is likely.
1139 Negative values for <code>len</code> are rejected since Expat 2.2.1.
1141 <code>isFinal</code> parameter informs the parser that this is the last
1143 <code>len</code> is zero.)
1147 If a parse error occurred, it returns <code>XML_STATUS_ERROR</code>.
1148 Otherwise it returns <code>XML_STATUS_OK</code> value.
1156 Simplified, <code>XML_Parse</code> can be considered a convenience wrapper
1158 to <code><a href="#XML_GetBuffer">XML_GetBuffer</a></code>
1159 and <code><a href="#XML_ParseBuffer">XML_ParseBuffer</a></code>
1160 (when Expat is built with macro <code>XML_CONTEXT_BYTES</code>
1162 <code>XML_Parse</code> is then functionally equivalent to calling
1163 <code><a href="#XML_GetBuffer">XML_GetBuffer</a></code>,
1164 <code>memcpy</code>, and
1165 <code><a href="#XML_ParseBuffer">XML_ParseBuffer</a></code>.
1170 <code><a href="#XML_GetBuffer">XML_GetBuffer</a></code> and
1171 <code><a href="#XML_ParseBuffer">XML_ParseBuffer</a></code> is advised
1173 if you're using <code>read</code> or similar functionality to fill your
1175 <code><a href="#XML_GetBuffer">XML_GetBuffer</a></code>,
1176 then parse with <code><a href="#XML_ParseBuffer">XML_ParseBuffer</a></code>.
1189 This is just like <code><a href= "#XML_Parse" >XML_Parse</a></code>,
1191 buffer from Expat with the <code><a href= "#XML_GetBuffer"
1192 >XML_GetBuffer</a></code> function, the application can avoid double
1197 Negative values for <code>len</code> are rejected since Expat 2.6.3.
1208 Obtain a buffer of size <code>len</code> to read a piece of the document
1209 into. A <code>NULL</code> value is returned if Expat can't allocate enough memory for
1210 this buffer. A <code>NULL</code> value may also be returned if <code>len</code> is zero.
1212 <code><a href= "#XML_ParseBuffer" >XML_ParseBuffer</a></code>. A
1246 <p>Stops parsing, causing <code><a href= "#XML_Parse"
1247 >XML_Parse</a></code> or <code><a href= "#XML_ParseBuffer"
1248 >XML_ParseBuffer</a></code> to return. Must be called from within a
1249 call-back handler, except when aborting (when <code>resumable</code>
1250 is <code>XML_FALSE</code>) an already suspended parser. Some
1265 <code>resumable</code> is <code>XML_TRUE</code>. Returns
1266 <code>XML_STATUS_OK</code> when successful,
1267 <code>XML_STATUS_ERROR</code> otherwise. The possible error codes
1270 <dt><code>XML_ERROR_SUSPENDED</code></dt>
1272 <dt><code>XML_ERROR_FINISHED</code></dt>
1274 <dt><code>XML_ERROR_SUSPEND_PE</code></dt>
1283 <p>When <code>resumable</code> is <code>XML_TRUE</code> then parsing
1284 is <em>suspended</em>, that is, <code><a href= "#XML_Parse"
1285 >XML_Parse</a></code> and <code><a href= "#XML_ParseBuffer"
1286 >XML_ParseBuffer</a></code> return <code>XML_STATUS_SUSPENDED</code>.
1287 Otherwise, parsing is <em>aborted</em>, that is, <code><a href=
1288 "#XML_Parse" >XML_Parse</a></code> and <code><a href=
1289 "#XML_ParseBuffer" >XML_ParseBuffer</a></code> return
1290 <code>XML_STATUS_ERROR</code> with error code
1291 <code>XML_ERROR_ABORTED</code>.</p>
1297 implementation of that handler to call <code><a href=
1298 "#XML_StopParser" >XML_StopParser</a></code> on the parent parser
1301 <p>When suspended, parsing can be resumed by calling <code><a href=
1302 "#XML_ResumeParser" >XML_ResumeParser</a></code>.</p>
1313 <p>Resumes parsing after it has been suspended with <code><a href=
1314 "#XML_StopParser" >XML_StopParser</a></code>. Must not be called from
1315 within a handler call-back. Returns same status codes as <code><a
1316 href= "#XML_Parse">XML_Parse</a></code> or <code><a href=
1317 "#XML_ParseBuffer" >XML_ParseBuffer</a></code>. An additional error
1318 code, <code>XML_ERROR_NOT_SUSPENDED</code>, will be returned if the
1326 and it is up to the application to call <code><a href=
1327 "#XML_ResumeParser" >XML_ResumeParser</a></code> on it at the
1355 processed. The <code>status</code> parameter <em>must not</em> be
1356 <code>NULL</code>.</p>
1367 to ignore all text not descended from a <code>para</code> element. One
1371 <p>A handler may be <em>unset</em> by providing a <code>NULL</code> pointer to the
1376 <code>XML_Char</code>. This type is conditionally defined in expat.h as
1377 either <code>char</code>, <code>wchar_t</code> or <code>unsigned short</code>.
1399 by a <code>NULL</code> pointer.</p>
1449 be split across calls to this handler. Note: Setting this handler to <code>NULL</code>
1557 <p>See also <code><a
1558 href="#XML_DefaultCurrent">XML_DefaultCurrent</a></code>.</p>
1578 <p>See also <code><a
1579 href="#XML_DefaultCurrent">XML_DefaultCurrent</a></code>.</p>
1600 <code>XML_SetParamEntityParsing</code></a>.)</p>
1602 <p>The <code>context</code> parameter specifies the parsing context in
1603 the format expected by the <code>context</code> argument to <code><a
1605 >XML_ExternalEntityParserCreate</a></code>. <code>code</code> is
1607 to be parsed later, it must be copied. <code>context</code> is <code>NULL</code>
1611 <p>The <code>base</code> parameter is the base to use for relative
1612 system identifiers. It is set by <code><a
1613 href="#XML_SetBase">XML_SetBase</a></code> and may be <code>NULL</code>. The
1614 <code>publicId</code> parameter is the public id given in the entity
1615 declaration and may be <code>NULL</code>. <code>systemId</code> is the system
1616 identifier specified in the entity declaration and is never <code>NULL</code>.</p>
1620 integer). <code>XML_STATUS_OK</code> should be returned for successful
1622 <code>XML_STATUS_ERROR</code> indicates failure, and causes the
1624 <code>XML_ERROR_EXTERNAL_ENTITY_HANDLING</code> error.</p>
1629 <code><a href= "#XML_ExternalEntityParserCreate"
1630 >XML_ExternalEntityParserCreate</a></code>. Using the returned
1645 <code>arg</code> is not <code>NULL</code>, it is the new value passed to the
1646 handler set using <code><a href="#XML_SetExternalEntityRefHandler"
1647 >XML_SetExternalEntityRefHandler</a></code>; if <code>arg</code> is
1648 <code>NULL</code>, the argument passed to the handler function will be the parser
1652 The type of <code>arg</code> and the type of the first argument to the
1654 <code>void *</code> to be passed to the handler, while the handler
1655 accepts an <code>XML_Parser</code>. This is a historical accident,
1657 causing compiler warnings for code that's known to work with this
1658 API. It is the responsibility of the application code to know the
1681 <a href="#XML_SetDefaultHandler"><code>XML_SetDefaultHandler</code></a>
1684 <p>The <code>is_parameter_entity</code> argument will be non-zero for
1714 <code><a href= "#XML_Parse" >XML_Parse</a></code> or <code><a href=
1715 "#XML_ParseBuffer" >XML_ParseBuffer</a></code> have been called on the
1717 with the given name, it should fill in the <code>info</code> data
1718 structure and return <code>XML_STATUS_OK</code>. Otherwise it
1719 should return <code>XML_STATUS_ERROR</code>. The handler will be called
1721 data pointer <code>encodingHandlerData</code> will be passed back to
1731 if the sequence itself is invalid. The convert pointer may be <code>NULL</code> if
1733 function is the data pointer from <code>XML_Encoding</code>. The
1737 <p>The function pointed at by <code>release</code> is called by the
1738 parser when it is finished with the encoding. It may be <code>NULL</code>.</p>
1805 distinguish is that the <code>version</code> parameter will be <code>NULL</code>
1806 for text declarations. The <code>encoding</code> parameter may be <code>NULL</code>
1807 for an XML declaration. The <code>standalone</code> argument will
1829 before any external or internal subset is parsed. Both <code>sysid</code>
1830 and <code>pubid</code> may be <code>NULL</code>. The <code>has_internal_subset</code>
1902 to a structure that contains the element model. It's the user code's
1903 responsibility to free model when finished with it. See <code>
1904 <a href="#XML_FreeContentModel">XML_FreeContentModel</a></code>.
1908 <p>The <code>model</code> argument is the root of a tree of
1909 <code>XML_Content</code> nodes. If <code>type</code> equals
1910 <code>XML_CTYPE_EMPTY</code> or <code>XML_CTYPE_ANY</code>, then
1911 <code>quant</code> will be <code>XML_CQUANT_NONE</code>, and the other
1912 fields will be zero or <code>NULL</code>. If <code>type</code> is
1913 <code>XML_CTYPE_MIXED</code>, then <code>quant</code> will be
1914 <code>XML_CQUANT_NONE</code> or <code>XML_CQUANT_REP</code> and
1915 <code>numchildren</code> will contain the number of elements that are
1916 allowed to be mixed in and <code>children</code> points to an array of
1917 <code>XML_Content</code> structures that will all have type
1919 <code>XML_CTYPE_EMPTY</code>, <code>XML_CTYPE_ANY</code>, or
1920 <code>XML_CTYPE_MIXED</code>.</p>
1922 <p>For type <code>XML_CTYPE_NAME</code>, the <code>name</code> field
1923 points to the name and the <code>numchildren</code> and
1924 <code>children</code> fields will be zero and <code>NULL</code>. The
1925 <code>quant</code> field will indicate any quantifiers placed on the
1928 <p>Types <code>XML_CTYPE_CHOICE</code> and <code>XML_CTYPE_SEQ</code>
1930 <code>numchildren</code> field indicates how many nodes in the choice
1931 or sequence and <code>children</code> points to the nodes.</p>
1953 handler. The <code>elname</code> parameter returns the name of the
1955 is in the <code>attname</code> parameter. The attribute type is in the
1956 <code>att_type</code> parameter. It is the string representing the
1959 <p>The <code>dflt</code> parameter holds the default value. It will be
1960 <code>NULL</code> in the case of "#IMPLIED" or "#REQUIRED" attributes. You can
1961 distinguish these two cases by checking the <code>isrequired</code>
1964 <code>isrequired</code>, but they will have the non-<code>NULL</code> fixed value
1965 in the <code>dflt</code> parameter.</p>
1988 The <code>is_parameter_entity</code> argument will be non-zero in the
1991 <p>For internal entities (<code><!ENTITY foo "bar"></code>),
1992 <code>value</code> will be non-<code>NULL</code> and <code>systemId</code>,
1993 <code>publicId</code>, and <code>notationName</code> will all be <code>NULL</code>.
1995 provided in the <code>value_length</code> parameter. Do not use
1996 <code>value_length</code> to test for internal entities, since it is
1998 <code>value</code> is <code>NULL</code>.</p> <p>The <code>notationName</code>
1999 argument will have a non-<code>NULL</code> value only for unparsed entity
2062 declaration. If this handler returns <code>XML_STATUS_ERROR</code>,
2063 then the parser will throw an <code>XML_ERROR_NOT_STANDALONE</code>
2070 functions return <code>XML_STATUS_ERROR</code> (a parse error has
2075 the parse functions to return <code>XML_STATUS_ERROR</code>.) The
2097 XML_ErrorString(enum XML_Error code);
2100 Return a string describing the error corresponding to code.
2101 The code should be one of the enums that can be returned from
2102 <code><a href= "#XML_GetErrorCode" >XML_GetErrorCode</a></code>.
2112 the values returned by <code><a href= "#XML_GetCurrentLineNumber"
2113 >XML_GetCurrentLineNumber</a></code> and <code><a href=
2114 "#XML_GetCurrentColumnNumber" >XML_GetCurrentColumnNumber</a></code>.
2124 <code>1</code>.
2144 <code>0</code> if the event is inside a reference to an internal
2160 <code>offset</code> to the offset within this buffer of the current
2161 parse position, and set the integer pointed at by <code>size</code> to
2173 <p>If <code>XML_CONTEXT_BYTES</code> is zero, this will always
2174 return <code>NULL</code>.</p>
2191 (default: <code>100.0</code>)
2192 of parser <code>p</code> to <code>maximumAmplificationFactor</code>, and
2193 returns <code>XML_TRUE</code> upon success and <code>XML_FALSE</code> upon error.
2201 <code>direct</code> is the number of bytes read from the primary document in parsing and
2202 <code>indirect</code> is the number of bytes added by expanding entities and reading of external DTD files, combined.
2204 <p>For a call to <code>XML_SetBillionLaughsAttackProtectionMaximumAmplification</code> to succeed:</p>
2206 <li>parser <code>p</code> must be a non-<code>NULL</code> root parser (without any parent parsers) and</li>
2207 <li><code>maximumAmplificationFactor</code> must be non-<code>NaN</code> and greater than or equal to <code>1.0</code>.</li>
2241 (default: <code>8 MiB</code>)
2242 of parser <code>p</code> to <code>activationThresholdBytes</code>, and
2243 returns <code>XML_TRUE</code> upon success and <code>XML_FALSE</code> upon error.
2246 <p>For a call to <code>XML_SetBillionLaughsAttackProtectionActivationThreshold</code> to succeed:</p>
2248 <li>parser <code>p</code> must be a non-<code>NULL</code> root parser (without any parent parsers).</li>
2279 The <code>enabled</code> argument should be <code>XML_TRUE</code> or <code>XML_FALSE</code>.
2282 Returns <code>XML_TRUE</code> on success, and <code>XML_FALSE</code> on error.
2301 <code>userData</code> when it is finished with the parser. So if you
2324 <code>userData</code> arguments. The user data can still be obtained
2325 using the <code><a href= "#XML_GetUserData"
2326 >XML_GetUserData</a></code> function.
2337 identifiers. The return value is <code>XML_STATUS_ERROR</code> if
2339 <code>XML_STATUS_OK</code>.
2362 <code>atts</code> array passed to the start tag handler of the first
2375 last call to <code><a href= "#XML_StartElementHandler"
2376 >XML_StartElementHandler</a></code>, or -1 if there is no ID
2395 Returns an array of <code>XML_AttrInfo</code> structures for the
2397 <code>XML_StartElementHandler</code> that were specified
2400 <code>XML_GetSpecifiedAttributeCount(parser) / 2</code>.
2411 passing a non-<code>NULL</code> encoding argument to the parser creation functions.
2412 It must not be called after <code><a href= "#XML_Parse"
2413 >XML_Parse</a></code> or <code><a href= "#XML_ParseBuffer"
2414 >XML_ParseBuffer</a></code> have been called on the given parser.
2415 Returns <code>XML_STATUS_OK</code> on success or
2416 <code>XML_STATUS_ERROR</code> on error.
2423 enum XML_ParamEntityParsing code);
2428 <code>code</code>.
2429 The choices for <code>code</code> are:
2431 <li><code>XML_PARAM_ENTITY_PARSING_NEVER</code></li>
2432 <li><code>XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE</code></li>
2433 <li><code>XML_PARAM_ENTITY_PARSING_ALWAYS</code></li>
2435 <b>Note:</b> If <code>XML_SetParamEntityParsing</code> is called after
2436 <code>XML_Parse</code> or <code>XML_ParseBuffer</code>, then it has
2451 after <code>XML_Parse</code> or <code>XML_ParseBuffer</code>.
2454 <p><b>Note:</b> One should not call <code>XML_SetHashSalt</code> with a
2456 that <code>XML_SetHashSalt</code> has <b>not</b> been called. Consequently
2471 declaration at all and <code>useDTD</code> is true, the
2473 <code>startDoctypeDeclHandler</code> and
2474 <code>endDoctypeDeclHandler</code> functions, if set, will not be
2476 <code><a href= "#XML_SetParamEntityParsing"
2477 >XML_SetParamEntityParsing</a></code>, will be honored.</p>
2480 external entity reference handler set via <code><a href=
2482 >XML_SetExternalEntityRefHandler</a></code> with both
2483 <code>publicId</code> and <code>systemId</code> set to <code>NULL</code>.</p>
2486 <code>XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING</code> and ignores
2487 <code>useDTD</code>. If called when Expat has been compiled without
2489 <code>XML_ERROR_FEATURE_REQUIRES_XML_DTD</code>. Otherwise, it
2490 returns <code>XML_ERROR_NONE</code>.</p>
2493 <code>useDTD == XML_TRUE</code> will make the parser behave as if
2507 <code><a href= "#XML_ParserCreateNS" >XML_ParserCreateNS</a></code>,
2508 i.e. when namespace processing is in effect. The <code>do_nst</code>
2510 namespace prefix. If this function is called with <code>do_nst</code>
2516 <code>do_nst</code> is zero, then namespaces are reported in the
2529 markup to be passed to the default handler set by <code><a
2530 href="#XML_SetDefaultHandler" >XML_SetDefaultHandler</a></code> or
2531 <code><a href="#XML_SetDefaultHandlerExpand"
2532 >XML_SetDefaultHandlerExpand</a></code>. It does nothing if there is
2542 Return the library version as a string (e.g. <code>"expat_1.95.1"</code>).
2562 <li><code>XML_MAJOR_VERSION</code></li>
2563 <li><code>XML_MINOR_VERSION</code></li>
2564 <li><code>XML_MICRO_VERSION</code></li>
2599 available from Expat. This function allows code that does need to
2602 <p>The return value is an array of <code>XML_Feature</code>,
2603 terminated by a record with a <code>feature</code> of
2604 <code>XML_FEATURE_END</code> and <code>name</code> of <code>NULL</code>,
2607 the type of character the <code>name</code> points to, records for the
2608 <code>XML_FEATURE_SIZEOF_XML_CHAR</code> and
2609 <code>XML_FEATURE_SIZEOF_XML_LCHAR</code> will be located at the
2610 beginning of the list, followed by <code>XML_FEATURE_UNICODE</code>
2611 and <code>XML_FEATURE_UNICODE_WCHAR_T</code>, if they are present at
2615 associated value, the <code>value</code> field is set to 0. At this
2619 <dt><code>XML_FEATURE_SIZEOF_XML_CHAR</code></dt>
2620 <dd>The number of bytes occupied by one <code>XML_Char</code>
2622 <dt><code>XML_FEATURE_SIZEOF_XML_LCHAR</code></dt>
2623 <dd>The number of bytes occupied by one <code>XML_LChar</code>
2625 <dt><code>XML_FEATURE_CONTEXT_BYTES</code></dt>
2627 reported by <code><a href= "#XML_GetInputContext"
2628 >XML_GetInputContext</a></code>.</dd>
2638 Function to deallocate the <code>model</code> argument passed to the
2639 <code>XML_ElementDeclHandler</code> callback set using <code><a
2640 href="#XML_SetElementDeclHandler" >XML_ElementDeclHandler</a></code>.
2644 <p>The following functions allow external code to share the memory
2645 allocator an <code>XML_Parser</code> has been configured to use. This
2647 parser object created by application code, or heavily layered
2658 Allocate <code>size</code> bytes of memory using the allocator the
2659 <code>parser</code> object has been configured to use. Returns a
2660 pointer to the memory or <code>NULL</code> on failure. Memory allocated in this
2661 way must be freed using <code><a href="#XML_MemFree"
2662 >XML_MemFree</a></code>.
2671 Allocate <code>size</code> bytes of memory using the allocator the
2672 <code>parser</code> object has been configured to use.
2673 <code>ptr</code> must point to a block of memory allocated by <code><a
2674 href="#XML_MemMalloc" >XML_MemMalloc</a></code> or
2675 <code>XML_MemRealloc</code>, or be <code>NULL</code>. This function tries to
2676 expand the block pointed to by <code>ptr</code> if possible. Returns
2677 a pointer to the memory or <code>NULL</code> on failure. On success, the original
2681 <code><a href="#XML_MemFree"
2682 >XML_MemFree</a></code>.
2691 Free a block of memory pointed to by <code>ptr</code>. The block must
2692 have been allocated by <code><a href="#XML_MemMalloc"
2693 >XML_MemMalloc</a></code> or <code>XML_MemRealloc</code>, or be <code>NULL</code>.