summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/manual.qbk4
-rw-r--r--docs/samples/custom_memory_management.cpp2
-rw-r--r--docs/samples/load_error_handling.cpp2
-rw-r--r--docs/samples/load_memory.cpp2
-rw-r--r--docs/samples/load_options.cpp8
-rw-r--r--docs/samples/modify_base.cpp2
-rw-r--r--docs/samples/modify_remove.cpp2
-rw-r--r--docs/samples/save_custom_writer.cpp2
-rw-r--r--docs/samples/save_declaration.cpp2
-rw-r--r--docs/samples/save_file.cpp2
-rw-r--r--docs/samples/save_options.cpp2
-rw-r--r--docs/samples/save_stream.cpp2
-rw-r--r--docs/samples/save_subtree.cpp2
-rw-r--r--docs/samples/text.cpp2
14 files changed, 18 insertions, 18 deletions
diff --git a/docs/manual.qbk b/docs/manual.qbk
index 617a971..6d7f4e1 100644
--- a/docs/manual.qbk
+++ b/docs/manual.qbk
@@ -602,7 +602,7 @@ The best way from the performance/memory point of view is to load document using
[#xml_document::load_string]
There is also a simple helper function for cases when you want to load the XML document from null-terminated character string:
- xml_parse_result xml_document::load(const char_t* contents, unsigned int options = parse_default);
+ xml_parse_result xml_document::load_string(const char_t* contents, unsigned int options = parse_default);
It is equivalent to calling `load_buffer` with `size` being either `strlen(contents)` or `wcslen(contents) * sizeof(wchar_t)`, depending on the character type. This function assumes native encoding for input data, so it does not do any encoding conversion. In general, this function is fine for loading small documents from string literals, but has more overhead and less functionality than the buffer loading functions.
@@ -2503,7 +2503,7 @@ Classes:
* `xml_parse_result `[link xml_document::load_stream load]`(std::wistream& stream, unsigned int options = parse_default);`
[lbr]
- * `xml_parse_result `[link xml_document::load_string load]`(const char_t* contents, unsigned int options = parse_default);`
+ * `xml_parse_result `[link xml_document::load_string load_string]`(const char_t* contents, unsigned int options = parse_default);`
[lbr]
* `xml_parse_result `[link xml_document::load_file load_file]`(const char* path, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);`
diff --git a/docs/samples/custom_memory_management.cpp b/docs/samples/custom_memory_management.cpp
index 92ccb71..f11d27e 100644
--- a/docs/samples/custom_memory_management.cpp
+++ b/docs/samples/custom_memory_management.cpp
@@ -21,7 +21,7 @@ int main()
//]
pugi::xml_document doc;
- doc.load("<node/>");
+ doc.load_string("<node/>");
}
// vim:et
diff --git a/docs/samples/load_error_handling.cpp b/docs/samples/load_error_handling.cpp
index 18dd331..8dceb99 100644
--- a/docs/samples/load_error_handling.cpp
+++ b/docs/samples/load_error_handling.cpp
@@ -6,7 +6,7 @@ void check_xml(const char* source)
{
//[code_load_error_handling
pugi::xml_document doc;
- pugi::xml_parse_result result = doc.load(source);
+ pugi::xml_parse_result result = doc.load_string(source);
if (result)
std::cout << "XML [" << source << "] parsed without errors, attr value: [" << doc.child("node").attribute("attr").value() << "]\n\n";
diff --git a/docs/samples/load_memory.cpp b/docs/samples/load_memory.cpp
index 1185944..490f7e4 100644
--- a/docs/samples/load_memory.cpp
+++ b/docs/samples/load_memory.cpp
@@ -55,7 +55,7 @@ int main()
{
//[code_load_memory_string
// You can use load to load document from null-terminated strings, for example literals:
- pugi::xml_parse_result result = doc.load("<mesh name='sphere'><bounds>0 0 1 1</bounds></mesh>");
+ pugi::xml_parse_result result = doc.load_string("<mesh name='sphere'><bounds>0 0 1 1</bounds></mesh>");
//]
std::cout << "Load result: " << result.description() << ", mesh name: " << doc.child("mesh").attribute("name").value() << std::endl;
diff --git a/docs/samples/load_options.cpp b/docs/samples/load_options.cpp
index 04b4b46..2589348 100644
--- a/docs/samples/load_options.cpp
+++ b/docs/samples/load_options.cpp
@@ -10,19 +10,19 @@ int main()
const char* source = "<!--comment--><node>&lt;</node>";
// Parsing with default options; note that comment node is not added to the tree, and entity reference &lt; is expanded
- doc.load(source);
+ doc.load_string(source);
std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n";
// Parsing with additional parse_comments option; comment node is now added to the tree
- doc.load(source, pugi::parse_default | pugi::parse_comments);
+ doc.load_string(source, pugi::parse_default | pugi::parse_comments);
std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n";
// Parsing with additional parse_comments option and without the (default) parse_escapes option; &lt; is not expanded
- doc.load(source, (pugi::parse_default | pugi::parse_comments) & ~pugi::parse_escapes);
+ doc.load_string(source, (pugi::parse_default | pugi::parse_comments) & ~pugi::parse_escapes);
std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n";
// Parsing with minimal option mask; comment node is not added to the tree, and &lt; is not expanded
- doc.load(source, pugi::parse_minimal);
+ doc.load_string(source, pugi::parse_minimal);
std::cout << "First node value: [" << doc.first_child().value() << "], node child value: [" << doc.child_value("node") << "]\n";
//]
}
diff --git a/docs/samples/modify_base.cpp b/docs/samples/modify_base.cpp
index 7d0959a..bd63708 100644
--- a/docs/samples/modify_base.cpp
+++ b/docs/samples/modify_base.cpp
@@ -6,7 +6,7 @@
int main()
{
pugi::xml_document doc;
- if (!doc.load("<node id='123'>text</node><!-- comment -->", pugi::parse_default | pugi::parse_comments)) return -1;
+ if (!doc.load_string("<node id='123'>text</node><!-- comment -->", pugi::parse_default | pugi::parse_comments)) return -1;
//[code_modify_base_node
pugi::xml_node node = doc.child("node");
diff --git a/docs/samples/modify_remove.cpp b/docs/samples/modify_remove.cpp
index 28c2f6b..53020e1 100644
--- a/docs/samples/modify_remove.cpp
+++ b/docs/samples/modify_remove.cpp
@@ -5,7 +5,7 @@
int main()
{
pugi::xml_document doc;
- if (!doc.load("<node><description>Simple node</description><param name='id' value='123'/></node>")) return -1;
+ if (!doc.load_string("<node><description>Simple node</description><param name='id' value='123'/></node>")) return -1;
//[code_modify_remove
// remove description node with the whole subtree
diff --git a/docs/samples/save_custom_writer.cpp b/docs/samples/save_custom_writer.cpp
index 6ea4300..9e9ee34 100644
--- a/docs/samples/save_custom_writer.cpp
+++ b/docs/samples/save_custom_writer.cpp
@@ -94,7 +94,7 @@ int main()
{
// get a test document
pugi::xml_document doc;
- doc.load("<foo bar='baz'>hey</foo>");
+ doc.load_string("<foo bar='baz'>hey</foo>");
// get contents as std::string (single pass)
std::cout << "contents: [" << node_to_string(doc) << "]\n";
diff --git a/docs/samples/save_declaration.cpp b/docs/samples/save_declaration.cpp
index 6c82061..a45831f 100644
--- a/docs/samples/save_declaration.cpp
+++ b/docs/samples/save_declaration.cpp
@@ -7,7 +7,7 @@ int main()
//[code_save_declaration
// get a test document
pugi::xml_document doc;
- doc.load("<foo bar='baz'><call>hey</call></foo>");
+ doc.load_string("<foo bar='baz'><call>hey</call></foo>");
// add a custom declaration node
pugi::xml_node decl = doc.prepend_child(pugi::node_declaration);
diff --git a/docs/samples/save_file.cpp b/docs/samples/save_file.cpp
index 30c1aa1..21413a2 100644
--- a/docs/samples/save_file.cpp
+++ b/docs/samples/save_file.cpp
@@ -6,7 +6,7 @@ int main()
{
// get a test document
pugi::xml_document doc;
- doc.load("<foo bar='baz'>hey</foo>");
+ doc.load_string("<foo bar='baz'>hey</foo>");
//[code_save_file
// save document to file
diff --git a/docs/samples/save_options.cpp b/docs/samples/save_options.cpp
index 6a49f66..82abdcd 100644
--- a/docs/samples/save_options.cpp
+++ b/docs/samples/save_options.cpp
@@ -7,7 +7,7 @@ int main()
//[code_save_options
// get a test document
pugi::xml_document doc;
- doc.load("<foo bar='baz'><call>hey</call></foo>");
+ doc.load_string("<foo bar='baz'><call>hey</call></foo>");
// default options; prints
// <?xml version="1.0"?>
diff --git a/docs/samples/save_stream.cpp b/docs/samples/save_stream.cpp
index d01965d..eba1863 100644
--- a/docs/samples/save_stream.cpp
+++ b/docs/samples/save_stream.cpp
@@ -6,7 +6,7 @@ int main()
{
// get a test document
pugi::xml_document doc;
- doc.load("<foo bar='baz'><call>hey</call></foo>");
+ doc.load_string("<foo bar='baz'><call>hey</call></foo>");
//[code_save_stream
// save document to standard output
diff --git a/docs/samples/save_subtree.cpp b/docs/samples/save_subtree.cpp
index 0091b3d..a94e10a 100644
--- a/docs/samples/save_subtree.cpp
+++ b/docs/samples/save_subtree.cpp
@@ -7,7 +7,7 @@ int main()
//[code_save_subtree
// get a test document
pugi::xml_document doc;
- doc.load("<foo bar='baz'><call>hey</call></foo>");
+ doc.load_string("<foo bar='baz'><call>hey</call></foo>");
// print document to standard output (prints <?xml version="1.0"?><foo bar="baz"><call>hey</call></foo>)
doc.save(std::cout, "", pugi::format_raw);
diff --git a/docs/samples/text.cpp b/docs/samples/text.cpp
index 9b1cf69..a0d591b 100644
--- a/docs/samples/text.cpp
+++ b/docs/samples/text.cpp
@@ -7,7 +7,7 @@ int main()
pugi::xml_document doc;
// get a test document
- doc.load("<project><name>test</name><version>1.1</version><public>yes</public></project>");
+ doc.load_string("<project><name>test</name><version>1.1</version><public>yes</public></project>");
pugi::xml_node project = doc.child("project");