diff --git a/expat/doc/reference.html b/expat/doc/reference.html index 82cdc96d..f20dc0f9 100644 --- a/expat/doc/reference.html +++ b/expat/doc/reference.html @@ -1123,6 +1123,30 @@ provided input has been parsed; only after the concluding call will all handler callbacks and parsing errors have happened.
+ +
+Simplified, XML_Parse
can be considered a convenience wrapper
+that is pairing calls
+to XML_GetBuffer
+and XML_ParseBuffer
+(when Expat is built with macro XML_CONTEXT_BYTES
+defined to a positive value, which is both common and default).
+XML_Parse
is then functionally equivalent to calling
+XML_GetBuffer
,
+memcpy
, and
+XML_ParseBuffer
.
+
+To avoid double copying of the input, direct use of functions
+XML_GetBuffer
and
+XML_ParseBuffer
is advised
+for most production use, e.g.
+if you're using read
or similar functionality to fill your
+buffers, fill directly into the buffer from
+XML_GetBuffer
,
+then parse with XML_ParseBuffer
.
+