IncredibleXMLParser
3.05
|
Go to the source code of this file.
Functions | |
void | example1 () |
Example 1: Basic operations to parse and collect data from a XML file //. More... | |
void | example2 () |
Example 2: memory management: when to use the 'stringDup' and the 'free' functions //. More... | |
void | example3 () |
Example 3: constructing & updating a tree of XMLNode //. More... | |
void | example4 () |
Example 4: by default, the XML parser is "forgiving" with respect to errors inside XML strings&files //. More... | |
void | example5 () |
Example 5: deleting a part of the tree of XMLNode //. More... | |
void | example6 () |
Example 6: inserting (and moving) a new XMLNode in the middle of an already existing XMLNode structure //. More... | |
void | example7 () |
Example 7: enumerate all the content of a xmlNode in the order in which they appear inside the XML //. More... | |
void | example8 () |
Example 8: base 64 encoding/decoding //. More... | |
void | example9 () |
Example 9: demonstration of multi-lingual XML file parsing //. More... | |
void | example10 () |
Example 10: usage of the "getParentNode()" method //. More... | |
void | example11 () |
Example 11: usage of the ToXMLStringTool class //. More... | |
void | example12 () |
Example 12: JSON Parser //. More... | |
int | main (int argc, char **argv) |
Variables | |
ToIXMLStringTool | tx |
ToIXMLStringTool | tx2 |
const wchar_t * | t2 =L"<a><b>some text</b><b>other text </a>" |
Copyright (c) 2013, Frank Vanden Berghen - All rights reserved.
See the file "AFPL-license.txt" about the licensing terms
This file contains 11 examples that demonstrates how to use the different functionnalities of the Incredible XML Parser in wchar_t* mode.
Definition in file IXMLTestUnicode.cpp.
void example1 | ( | ) |
Example 1: Basic operations to parse and collect data from a XML file //.
Definition at line 30 of file IXMLTestUnicode.cpp.
References ITCXMLNode::getAttribute(), ITCXMLNode::getAttributeValue(), ITCXMLNode::getChildNode(), ITCXMLNode::getChildNodeByPath(), ITCXMLNode::getClear(), ITCXMLNode::getText(), ITCXMLNode::nChildNode(), IXMLDomParser::openFileHelper(), IXMLDomParser::setRemoveClears(), IXMLClear::sValue, and IXMLRenderer::writeToFile().
void example10 | ( | ) |
Example 10: usage of the "getParentNode()" method //.
Definition at line 256 of file IXMLTestUnicode.cpp.
References ITCXMLNode::deepCopy(), IXMLNode::getChildNode(), ITCXMLNode::getName(), IXMLNode::getParentNode(), IXMLDomParser::parseString(), and t2.
void example11 | ( | ) |
Example 11: usage of the ToXMLStringTool class //.
Definition at line 285 of file IXMLTestUnicode.cpp.
References ToIXMLStringTool::toXML().
void example12 | ( | ) |
Example 12: JSON Parser //.
Definition at line 324 of file IXMLTestUnicode.cpp.
References ITCXMLNode::getElementByPath(), IXMLDomParser::parse(), and IXMLRenderer::writeToFile().
void example2 | ( | ) |
Example 2: memory management: when to use the 'stringDup' and the 'free' functions //.
Definition at line 69 of file IXMLTestUnicode.cpp.
References IXMLDomParser::clear(), ITCXMLNode::getAttribute(), IXMLStringDup(), and IXMLDomParser::openFileHelper().
void example3 | ( | ) |
Example 3: constructing & updating a tree of XMLNode //.
Definition at line 92 of file IXMLTestUnicode.cpp.
References IXMLNode::addAttribute(), IXMLNode::addChild(), IXMLNode::addText(), IXMLNode::createXMLTopNode(), IXMLNode::deleteAttribute(), IXMLNode::deleteNodeContent(), IXMLNode::deleteText(), IXMLNode::getChildNode(), IXMLRenderer::getString(), TRUE, and IXMLNode::updateAttribute().
void example4 | ( | ) |
Example 4: by default, the XML parser is "forgiving" with respect to errors inside XML strings&files //.
Definition at line 129 of file IXMLTestUnicode.cpp.
References IXMLResults::errorCode, IPullParser::getErrorMessage(), IXMLRenderer::getString(), IXMLDomParser::parseStringNonT(), and t2.
void example5 | ( | ) |
Example 5: deleting a part of the tree of XMLNode //.
Definition at line 148 of file IXMLTestUnicode.cpp.
References ITCXMLNode::deepCopy(), IXMLNode::deleteNodeContent(), IXMLNode::getChildNode(), IXMLDomParser::parseString(), and t2.
void example6 | ( | ) |
Example 6: inserting (and moving) a new XMLNode in the middle of an already existing XMLNode structure //.
Definition at line 174 of file IXMLTestUnicode.cpp.
References IXMLNode::addChild(), ITCXMLNode::deepCopy(), IXMLRenderer::getString(), IXMLDomParser::parseString(), IXMLNode::positionOfChildNode(), and t2.
void example7 | ( | ) |
Example 7: enumerate all the content of a xmlNode in the order in which they appear inside the XML //.
Definition at line 195 of file IXMLTestUnicode.cpp.
References IPullParser::findPath(), ITCXMLNode::getAttributeName(), ITCXMLNode::getAttributeValue(), ITCXMLNode::getClear(), ITCXMLNode::getName(), ITCXMLNode::nElement(), IXMLDomParser::parseOneChild(), IXMLDomParser::setRemoveClears(), and IXMLClear::sValue.
void example8 | ( | ) |
Example 8: base 64 encoding/decoding //.
Definition at line 222 of file IXMLTestUnicode.cpp.
References IXMLParserBase64Tool::decode(), and IXMLParserBase64Tool::encode().
void example9 | ( | ) |
Example 9: demonstration of multi-lingual XML file parsing //.
Definition at line 242 of file IXMLTestUnicode.cpp.
References IXMLDomParser::parseFileNonT(), and IXMLRenderer::writeToFile().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 338 of file IXMLTestUnicode.cpp.
References example1(), example10(), example11(), example12(), example2(), example3(), example4(), example5(), example6(), example7(), example8(), and example9().
const wchar_t* t2 =L"<a><b>some text</b><b>other text </a>" |
Definition at line 23 of file IXMLTestUnicode.cpp.
Definition at line 22 of file IXMLTestUnicode.cpp.
ToIXMLStringTool tx2 |
Definition at line 22 of file IXMLTestUnicode.cpp.