From 2894cc4eb253859479a13b709faab1e95b7a924c Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Fri, 24 Sep 2010 05:44:13 +0000 Subject: docs: Reverted accidentally committed HTML documentation git-svn-id: http://pugixml.googlecode.com/svn/trunk@753 99668b35-9821-0410-8761-19e4c4f06640 --- docs/manual/loading.html | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'docs/manual/loading.html') diff --git a/docs/manual/loading.html b/docs/manual/loading.html index 547b355..a3c1515 100644 --- a/docs/manual/loading.html +++ b/docs/manual/loading.html @@ -65,27 +65,20 @@

Loading document from file

-

- The most common source of XML data is files; pugixml provides dedicated functions - for loading XML document from file: +

+ The most common source of XML data is files; pugixml provides a separate + function for loading XML document from file:

xml_parse_result xml_document::load_file(const char* path, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);
-xml_parse_result xml_document::load_file(const wchar_t* path, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);
 

- These functions accept file path as its first argument, and also two optional + This function accepts file path as its first argument, and also two optional arguments, which specify parsing options (see Parsing options) and input data encoding (see Encodings). The path has the target operating system format, so it can be a relative or absolute one, it should have the delimiters of target system, it should have the exact case if target - file system is case-sensitive, etc. -

-

- File path is passed to system file opening function as is in case of the - first function (which accepts const - char* path); the second function either uses - a special file opening function if it is provided by the runtime library - or converts the path to UTF-8 and uses the system file opening function. + file system is case-sensitive, etc. File path is passed to system file opening + function as is.

load_file destroys the existing @@ -95,6 +88,20 @@ (i.e. last successfully parsed position in the input file, if parsing fails). See Handling parsing errors for error handling details.

+
+ + + + + +
[Note]Note

+ As of version 0.9, there is no function for loading XML document from wide + character path. Unfortunately, there is no portable way to do this; the + version 1.0 will provide such function only for platforms with the corresponding + functionality. You can use stream-loading functions as a workaround if + your STL implementation can open file streams via wchar_t + paths. +

This is an example of loading XML document from file (samples/load_file.cpp):

@@ -290,7 +297,7 @@

Handling parsing errors

-

+

All document loading functions return the parsing result via xml_parse_result object. It contains parsing status, the offset of last successfully parsed character from the beginning of the source stream, and the encoding of the source stream: @@ -301,7 +308,6 @@ ptrdiff_t offset; xml_encoding encoding; - xml_parse_result(); operator bool() const; const char* description() const; }; -- cgit v1.2.3