diff --git a/docs/_example_1.html b/docs/_example_1.html new file mode 100644 index 0000000..ef2ce7c --- /dev/null +++ b/docs/_example_1.html @@ -0,0 +1,75 @@ + + +
+ + + + +|
+ TinyXML-2
+ 6.0.0
+
+ |
+
+ 1.8.13
+
+
+
diff --git a/docs/_example_2.html b/docs/_example_2.html
new file mode 100644
index 0000000..d852f7e
--- /dev/null
+++ b/docs/_example_2.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+|
+ TinyXML-2
+ 6.0.0
+
+ |
+
+ 1.8.13
+
+
+
diff --git a/docs/_example_3.html b/docs/_example_3.html
new file mode 100644
index 0000000..a64edfe
--- /dev/null
+++ b/docs/_example_3.html
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+|
+ TinyXML-2
+ 6.0.0
+
+ |
+
(The XML is an excerpt from "dream.xml").
+The structure of the XML file is:
+For this example, we want to print out the title of the play. The text of the title (what we want) is child of the "TITLE" element which is a child of the "PLAY" element.
+We want to skip the declaration and dtd, so the method FirstChildElement() is a good choice. The FirstChildElement() of the Document is the "PLAY" Element, the FirstChildElement() of the "PLAY" Element is the "TITLE" Element.
+We can then use the convenience function GetText() to get the title of the play.
+Text is just another Node in the XML DOM. And in fact you should be a little cautious with it, as text nodes can contain elements.
+Consider: A Midsummer Night's <b>Dream</b> +
It is more correct to actually query the Text Node if in doubt:
+Noting that here we use FirstChild() since we are looking for XMLText, not an element, and ToText() is a cast from a Node to a XMLText.
+
+ 1.8.13
+
+
+
diff --git a/docs/_example_4.html b/docs/_example_4.html
new file mode 100644
index 0000000..7bae7ce
--- /dev/null
+++ b/docs/_example_4.html
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+|
+ TinyXML-2
+ 6.0.0
+
+ |
+
There are fundamentally 2 ways of writing a key-value pair into an XML file. (Something that's always annoyed me about XML.) Either by using attributes, or by writing the key name into an element and the value into the text node wrapped by the element. Both approaches are illustrated in this example, which shows two ways to encode the value "2" into the key "v":
+TinyXML-2 has accessors for both approaches.
+When using an attribute, you navigate to the XMLElement with that attribute and use the QueryIntAttribute() group of methods. (Also QueryFloatAttribute(), etc.)
+When using the text approach, you need to navigate down one more step to the XMLElement that contains the text. Note the extra FirstChildElement( "v" ) in the code below. The value of the text can then be safely queried with the QueryIntText() group of methods. (Also QueryFloatText(), etc.)
+
+ 1.8.13
+
+
+
diff --git a/docs/annotated.html b/docs/annotated.html
index 5f12592..35afe8b 100644
--- a/docs/annotated.html
+++ b/docs/annotated.html
@@ -83,7 +83,7 @@ $(function() {
1.8.13
diff --git a/docs/classes.html b/docs/classes.html
index 7b39351..aa5daf7 100644
--- a/docs/classes.html
+++ b/docs/classes.html
@@ -75,7 +75,7 @@ $(function() {
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_attribute-members.html b/docs/classtinyxml2_1_1_x_m_l_attribute-members.html
index 2335976..c2c6687 100644
--- a/docs/classtinyxml2_1_1_x_m_l_attribute-members.html
+++ b/docs/classtinyxml2_1_1_x_m_l_attribute-members.html
@@ -95,7 +95,7 @@ $(function() {
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_attribute.html b/docs/classtinyxml2_1_1_x_m_l_attribute.html
index e483aa0..4aabc58 100644
--- a/docs/classtinyxml2_1_1_x_m_l_attribute.html
+++ b/docs/classtinyxml2_1_1_x_m_l_attribute.html
@@ -215,7 +215,7 @@ void
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_comment-members.html b/docs/classtinyxml2_1_1_x_m_l_comment-members.html
index 97bb67c..6341306 100644
--- a/docs/classtinyxml2_1_1_x_m_l_comment-members.html
+++ b/docs/classtinyxml2_1_1_x_m_l_comment-members.html
@@ -105,7 +105,7 @@ $(function() {
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_comment.html b/docs/classtinyxml2_1_1_x_m_l_comment.html
index 8bc4f65..7a7811d 100644
--- a/docs/classtinyxml2_1_1_x_m_l_comment.html
+++ b/docs/classtinyxml2_1_1_x_m_l_comment.html
@@ -292,7 +292,7 @@ const char* xmlcstr = printer.CStr();
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_const_handle-members.html b/docs/classtinyxml2_1_1_x_m_l_const_handle-members.html
index 870953f..28f1a94 100644
--- a/docs/classtinyxml2_1_1_x_m_l_const_handle-members.html
+++ b/docs/classtinyxml2_1_1_x_m_l_const_handle-members.html
@@ -73,7 +73,7 @@ $(function() {
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_const_handle.html b/docs/classtinyxml2_1_1_x_m_l_const_handle.html
index 51ff720..746c08a 100644
--- a/docs/classtinyxml2_1_1_x_m_l_const_handle.html
+++ b/docs/classtinyxml2_1_1_x_m_l_const_handle.html
@@ -79,7 +79,7 @@ $(function() {
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_declaration-members.html b/docs/classtinyxml2_1_1_x_m_l_declaration-members.html
index d3e4860..4e57bcd 100644
--- a/docs/classtinyxml2_1_1_x_m_l_declaration-members.html
+++ b/docs/classtinyxml2_1_1_x_m_l_declaration-members.html
@@ -105,7 +105,7 @@ $(function() {
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_declaration.html b/docs/classtinyxml2_1_1_x_m_l_declaration.html
index 859fba2..1055f11 100644
--- a/docs/classtinyxml2_1_1_x_m_l_declaration.html
+++ b/docs/classtinyxml2_1_1_x_m_l_declaration.html
@@ -294,7 +294,7 @@ const char* xmlcstr = printer.CStr();
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_document-members.html b/docs/classtinyxml2_1_1_x_m_l_document-members.html
index ef50965..1d19769 100644
--- a/docs/classtinyxml2_1_1_x_m_l_document-members.html
+++ b/docs/classtinyxml2_1_1_x_m_l_document-members.html
@@ -128,7 +128,7 @@ $(function() {
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_document.html b/docs/classtinyxml2_1_1_x_m_l_document.html
index fea9888..c6f81ab 100644
--- a/docs/classtinyxml2_1_1_x_m_l_document.html
+++ b/docs/classtinyxml2_1_1_x_m_l_document.html
@@ -734,7 +734,7 @@ doc.Print( &printer );
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_element-members.html b/docs/classtinyxml2_1_1_x_m_l_element-members.html
index da4c930..c8396c7 100644
--- a/docs/classtinyxml2_1_1_x_m_l_element-members.html
+++ b/docs/classtinyxml2_1_1_x_m_l_element-members.html
@@ -150,7 +150,7 @@ $(function() {
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_element.html b/docs/classtinyxml2_1_1_x_m_l_element.html
index 94cf046..34ad7f4 100644
--- a/docs/classtinyxml2_1_1_x_m_l_element.html
+++ b/docs/classtinyxml2_1_1_x_m_l_element.html
@@ -700,7 +700,7 @@ QueryIntAttribute( "foo", &value ); // if "foo" isn't found, value will
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_handle-members.html b/docs/classtinyxml2_1_1_x_m_l_handle-members.html
index 9da3d5b..5d6b991 100644
--- a/docs/classtinyxml2_1_1_x_m_l_handle-members.html
+++ b/docs/classtinyxml2_1_1_x_m_l_handle-members.html
@@ -90,7 +90,7 @@ $(function() {
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_handle.html b/docs/classtinyxml2_1_1_x_m_l_handle.html
index d063857..143c292 100644
--- a/docs/classtinyxml2_1_1_x_m_l_handle.html
+++ b/docs/classtinyxml2_1_1_x_m_l_handle.html
@@ -181,7 +181,7 @@ if ( child2 )
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_node-members.html b/docs/classtinyxml2_1_1_x_m_l_node-members.html
index 818fa0e..28f194c 100644
--- a/docs/classtinyxml2_1_1_x_m_l_node-members.html
+++ b/docs/classtinyxml2_1_1_x_m_l_node-members.html
@@ -105,7 +105,7 @@ $(function() {
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_node.html b/docs/classtinyxml2_1_1_x_m_l_node.html
index 0524ae8..fee79b3 100644
--- a/docs/classtinyxml2_1_1_x_m_l_node.html
+++ b/docs/classtinyxml2_1_1_x_m_l_node.html
@@ -573,7 +573,7 @@ Text: the text string
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_printer-members.html b/docs/classtinyxml2_1_1_x_m_l_printer-members.html
index 8bb479f..bf5c2ca 100644
--- a/docs/classtinyxml2_1_1_x_m_l_printer-members.html
+++ b/docs/classtinyxml2_1_1_x_m_l_printer-members.html
@@ -98,7 +98,7 @@ $(function() {
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_printer.html b/docs/classtinyxml2_1_1_x_m_l_printer.html
index d175434..a9c492b 100644
--- a/docs/classtinyxml2_1_1_x_m_l_printer.html
+++ b/docs/classtinyxml2_1_1_x_m_l_printer.html
@@ -402,7 +402,7 @@ printer.CloseElement();
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_text-members.html b/docs/classtinyxml2_1_1_x_m_l_text-members.html
index 0a281ab..6688804 100644
--- a/docs/classtinyxml2_1_1_x_m_l_text-members.html
+++ b/docs/classtinyxml2_1_1_x_m_l_text-members.html
@@ -107,7 +107,7 @@ $(function() {
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_text.html b/docs/classtinyxml2_1_1_x_m_l_text.html
index b1e07b1..0ae5864 100644
--- a/docs/classtinyxml2_1_1_x_m_l_text.html
+++ b/docs/classtinyxml2_1_1_x_m_l_text.html
@@ -302,7 +302,7 @@ const char* xmlcstr = printer.CStr();
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_unknown-members.html b/docs/classtinyxml2_1_1_x_m_l_unknown-members.html
index 97d5eed..b9d2a6a 100644
--- a/docs/classtinyxml2_1_1_x_m_l_unknown-members.html
+++ b/docs/classtinyxml2_1_1_x_m_l_unknown-members.html
@@ -105,7 +105,7 @@ $(function() {
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_unknown.html b/docs/classtinyxml2_1_1_x_m_l_unknown.html
index bb7b77d..7274825 100644
--- a/docs/classtinyxml2_1_1_x_m_l_unknown.html
+++ b/docs/classtinyxml2_1_1_x_m_l_unknown.html
@@ -293,7 +293,7 @@ const char* xmlcstr = printer.CStr();
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_visitor-members.html b/docs/classtinyxml2_1_1_x_m_l_visitor-members.html
index b72cf10..a06aae6 100644
--- a/docs/classtinyxml2_1_1_x_m_l_visitor-members.html
+++ b/docs/classtinyxml2_1_1_x_m_l_visitor-members.html
@@ -81,7 +81,7 @@ $(function() {
1.8.13
diff --git a/docs/classtinyxml2_1_1_x_m_l_visitor.html b/docs/classtinyxml2_1_1_x_m_l_visitor.html
index e14a56f..1751452 100644
--- a/docs/classtinyxml2_1_1_x_m_l_visitor.html
+++ b/docs/classtinyxml2_1_1_x_m_l_visitor.html
@@ -130,7 +130,7 @@ virtual bool
1.8.13
diff --git a/docs/files.html b/docs/files.html
index 12b3e2a..1e17bfb 100644
--- a/docs/files.html
+++ b/docs/files.html
@@ -71,7 +71,7 @@ $(function() {
1.8.13
diff --git a/docs/functions.html b/docs/functions.html
index f8d0998..1b34f44 100644
--- a/docs/functions.html
+++ b/docs/functions.html
@@ -533,7 +533,7 @@ $(function() {
1.8.13
diff --git a/docs/functions_func.html b/docs/functions_func.html
index 48e103d..03ddd2e 100644
--- a/docs/functions_func.html
+++ b/docs/functions_func.html
@@ -533,7 +533,7 @@ $(function() {
1.8.13
diff --git a/docs/hierarchy.html b/docs/hierarchy.html
index f09879a..5a2435d 100644
--- a/docs/hierarchy.html
+++ b/docs/hierarchy.html
@@ -82,7 +82,7 @@ $(function() {
1.8.13
diff --git a/docs/index.html b/docs/index.html
index eff88ff..9b08d16 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -222,7 +222,7 @@ printer.CloseElement();
1.8.13
diff --git a/docs/pages.html b/docs/pages.html
index 8e51dfc..fefa1e2 100644
--- a/docs/pages.html
+++ b/docs/pages.html
@@ -65,16 +65,16 @@ $(function() {
1.8.13
diff --git a/docs/search/all_6.js b/docs/search/all_6.js
index 8fa5a24..cc2aeca 100644
--- a/docs/search/all_6.js
+++ b/docs/search/all_6.js
@@ -1,6 +1,6 @@
var searchData=
[
- ['get_20information_20out_20of_20xml',['Get information out of XML',['../_example-3.html',1,'']]],
+ ['get_20information_20out_20of_20xml',['Get information out of XML',['../_example_3.html',1,'']]],
['getdocument',['GetDocument',['../classtinyxml2_1_1_x_m_l_node.html#a2de84cfa4ec3fe249bad745069d145f1',1,'tinyxml2::XMLNode::GetDocument() const'],['../classtinyxml2_1_1_x_m_l_node.html#af343d1ef0b45c0020e62d784d7e67a68',1,'tinyxml2::XMLNode::GetDocument()']]],
['getlinenum',['GetLineNum',['../classtinyxml2_1_1_x_m_l_node.html#a9b5fc636646fda761d342c72e91cb286',1,'tinyxml2::XMLNode::GetLineNum()'],['../classtinyxml2_1_1_x_m_l_attribute.html#a02d5ea924586e35f9c13857d1671b765',1,'tinyxml2::XMLAttribute::GetLineNum()']]],
['gettext',['GetText',['../classtinyxml2_1_1_x_m_l_element.html#a6d5c8d115561ade4e4456b71d91b6f51',1,'tinyxml2::XMLElement']]],
diff --git a/docs/search/all_9.js b/docs/search/all_9.js
index 1b64fe0..7c6cde9 100644
--- a/docs/search/all_9.js
+++ b/docs/search/all_9.js
@@ -1,6 +1,6 @@
var searchData=
[
- ['load_20an_20xml_20file',['Load an XML File',['../_example-1.html',1,'']]],
+ ['load_20an_20xml_20file',['Load an XML File',['../_example_1.html',1,'']]],
['lastchild',['LastChild',['../classtinyxml2_1_1_x_m_l_node.html#a9b8583a277e8e26f4cbbb5492786778e',1,'tinyxml2::XMLNode::LastChild()'],['../classtinyxml2_1_1_x_m_l_handle.html#a9d09f04435f0f2f7d0816b0198d0517b',1,'tinyxml2::XMLHandle::LastChild()']]],
['lastchildelement',['LastChildElement',['../classtinyxml2_1_1_x_m_l_node.html#a173e9d1341bc56992e2d320a35936551',1,'tinyxml2::XMLNode::LastChildElement()'],['../classtinyxml2_1_1_x_m_l_handle.html#a42cccd0ce8b1ce704f431025e9f19e0c',1,'tinyxml2::XMLHandle::LastChildElement()']]],
['loadfile',['LoadFile',['../classtinyxml2_1_1_x_m_l_document.html#a2ebd4647a8af5fc6831b294ac26a150a',1,'tinyxml2::XMLDocument::LoadFile(const char *filename)'],['../classtinyxml2_1_1_x_m_l_document.html#a5f1d330fad44c52f3d265338dd2a6dc2',1,'tinyxml2::XMLDocument::LoadFile(FILE *)']]]
diff --git a/docs/search/all_c.js b/docs/search/all_c.js
index 7d117f6..2bc8ffa 100644
--- a/docs/search/all_c.js
+++ b/docs/search/all_c.js
@@ -1,6 +1,6 @@
var searchData=
[
- ['parse_20an_20xml_20from_20char_20buffer',['Parse an XML from char buffer',['../_example-2.html',1,'']]],
+ ['parse_20an_20xml_20from_20char_20buffer',['Parse an XML from char buffer',['../_example_2.html',1,'']]],
['parent',['Parent',['../classtinyxml2_1_1_x_m_l_node.html#ae0f62bc186c56c2e0483ebd52dbfbe34',1,'tinyxml2::XMLNode']]],
['parse',['Parse',['../classtinyxml2_1_1_x_m_l_document.html#a1819bd34f540a7304c105a6232d25a1f',1,'tinyxml2::XMLDocument']]],
['previoussibling',['PreviousSibling',['../classtinyxml2_1_1_x_m_l_node.html#aac667c513d445f8b783e1e15ef9d3551',1,'tinyxml2::XMLNode::PreviousSibling()'],['../classtinyxml2_1_1_x_m_l_handle.html#a428374e756f4db4cbc287fec64eae02c',1,'tinyxml2::XMLHandle::PreviousSibling()']]],
diff --git a/docs/search/all_e.js b/docs/search/all_e.js
index a327229..8420c7d 100644
--- a/docs/search/all_e.js
+++ b/docs/search/all_e.js
@@ -1,5 +1,5 @@
var searchData=
[
- ['read_20attributes_20and_20text_20information_2e',['Read attributes and text information.',['../_example-4.html',1,'']]],
+ ['read_20attributes_20and_20text_20information_2e',['Read attributes and text information.',['../_example_4.html',1,'']]],
['rootelement',['RootElement',['../classtinyxml2_1_1_x_m_l_document.html#ad2b70320d3c2a071c2f36928edff3e1c',1,'tinyxml2::XMLDocument']]]
];
diff --git a/docs/search/pages_0.js b/docs/search/pages_0.js
index 868fb87..e5f2b5d 100644
--- a/docs/search/pages_0.js
+++ b/docs/search/pages_0.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['get_20information_20out_20of_20xml',['Get information out of XML',['../_example-3.html',1,'']]]
+ ['get_20information_20out_20of_20xml',['Get information out of XML',['../_example_3.html',1,'']]]
];
diff --git a/docs/search/pages_1.js b/docs/search/pages_1.js
index a11be89..78a399a 100644
--- a/docs/search/pages_1.js
+++ b/docs/search/pages_1.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['load_20an_20xml_20file',['Load an XML File',['../_example-1.html',1,'']]]
+ ['load_20an_20xml_20file',['Load an XML File',['../_example_1.html',1,'']]]
];
diff --git a/docs/search/pages_2.js b/docs/search/pages_2.js
index 5b909ab..ff2d6df 100644
--- a/docs/search/pages_2.js
+++ b/docs/search/pages_2.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['parse_20an_20xml_20from_20char_20buffer',['Parse an XML from char buffer',['../_example-2.html',1,'']]]
+ ['parse_20an_20xml_20from_20char_20buffer',['Parse an XML from char buffer',['../_example_2.html',1,'']]]
];
diff --git a/docs/search/pages_3.js b/docs/search/pages_3.js
index 41376dd..8fa0015 100644
--- a/docs/search/pages_3.js
+++ b/docs/search/pages_3.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['read_20attributes_20and_20text_20information_2e',['Read attributes and text information.',['../_example-4.html',1,'']]]
+ ['read_20attributes_20and_20text_20information_2e',['Read attributes and text information.',['../_example_4.html',1,'']]]
];
diff --git a/docs/tinyxml2_8h_source.html b/docs/tinyxml2_8h_source.html
index 3b67758..673070a 100644
--- a/docs/tinyxml2_8h_source.html
+++ b/docs/tinyxml2_8h_source.html
@@ -172,7 +172,7 @@ $(function() {
1.8.13
diff --git a/xmltest.cpp b/xmltest.cpp
index 91494ec..0e8de61 100644
--- a/xmltest.cpp
+++ b/xmltest.cpp
@@ -112,7 +112,7 @@ int example_1()
return doc.ErrorID();
}
-/** @page Example-1 Load an XML File
+/** @page Example_1 Load an XML File
* @dontinclude ./xmltest.cpp
* Basic XML file loading.
* The basic syntax to load an XML file from
@@ -131,7 +131,7 @@ int example_2()
return doc.ErrorID();
}
-/** @page Example-2 Parse an XML from char buffer
+/** @page Example_2 Parse an XML from char buffer
* @dontinclude ./xmltest.cpp
* Basic XML string parsing.
* The basic syntax to parse an XML for
@@ -164,7 +164,7 @@ int example_3()
return doc.ErrorID();
}
-/** @page Example-3 Get information out of XML
+/** @page Example_3 Get information out of XML
@dontinclude ./xmltest.cpp
In this example, we navigate a simple XML
file, and read some interesting text. Note
@@ -255,7 +255,7 @@ bool example_4()
return !doc.Error() && ( v0 == v1 );
}
-/** @page Example-4 Read attributes and text information.
+/** @page Example_4 Read attributes and text information.
@dontinclude ./xmltest.cpp
There are fundamentally 2 ways of writing a key-value
@@ -338,10 +338,10 @@ int main( int argc, const char ** argv )
}
fclose( fp );
- XMLTest( "Example-1", 0, example_1() );
- XMLTest( "Example-2", 0, example_2() );
- XMLTest( "Example-3", 0, example_3() );
- XMLTest( "Example-4", true, example_4() );
+ XMLTest( "Example_1", 0, example_1() );
+ XMLTest( "Example_2", 0, example_2() );
+ XMLTest( "Example_3", 0, example_3() );
+ XMLTest( "Example_4", true, example_4() );
/* ------ Example 2: Lookup information. ---- */