aboutsummaryrefslogtreecommitdiff
path: root/examples/09.Meshviewer/main.cpp
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2021-07-07 16:52:49 +0200
committersfan5 <sfan5@live.de>2021-07-07 17:04:05 +0200
commit729c214c003efb738c08f27817d569feb318dbf5 (patch)
treee490d74a3cbf14bc9ba2f8cb4c13053673fbf64d /examples/09.Meshviewer/main.cpp
parentecb30e3d96a98e032aa05f46732bb7bed14a313c (diff)
downloadirrlicht-729c214c003efb738c08f27817d569feb318dbf5.tar.xz
Drop XML implementation, related code and dependent features
Diffstat (limited to 'examples/09.Meshviewer/main.cpp')
-rw-r--r--examples/09.Meshviewer/main.cpp52
1 files changed, 1 insertions, 51 deletions
diff --git a/examples/09.Meshviewer/main.cpp b/examples/09.Meshviewer/main.cpp
index 1a5f51a..024c7fa 100644
--- a/examples/09.Meshviewer/main.cpp
+++ b/examples/09.Meshviewer/main.cpp
@@ -4,8 +4,7 @@ This tutorial show how to create a more complex application with the engine.
We construct a simple mesh viewer using the user interface API and the
scene management of Irrlicht. The tutorial show how to create and use Buttons,
Windows, Toolbars, Menus, ComboBoxes, Tabcontrols, Editboxes, Images,
-MessageBoxes, SkyBoxes, and how to parse XML files with the integrated XML
-reader of the engine.
+MessageBoxes, SkyBoxes.
We start like in most other tutorials: Include all necessary header files, add
a comment to let the engine be linked with the correct .lib file in Visual
@@ -766,55 +765,6 @@ int main(int argc, char* argv[])
// add our media directory as "search path"
Device->getFileSystem()->addFileArchive(getExampleMediaPath());
- /*
- The next step is to read the configuration file. It is stored in the xml
- format and looks a little bit like this:
-
- @verbatim
- <?xml version="1.0"?>
- <config>
- <startUpModel file="some filename" />
- <messageText caption="Irrlicht Engine Mesh Viewer">
- Hello!
- </messageText>
- </config>
- @endverbatim
-
- We need the data stored in there to be written into the global variables
- StartUpModelFile, MessageText and Caption. This is now done using the
- Irrlicht Engine integrated XML parser:
- */
-
- // read configuration from xml file
-
- io::IXMLReader* xml = Device->getFileSystem()->createXMLReader( L"config.xml");
-
- while(xml && xml->read())
- {
- switch(xml->getNodeType())
- {
- case io::EXN_TEXT:
- // in this xml file, the only text which occurs is the
- // messageText
- MessageText = xml->getNodeData();
- break;
- case io::EXN_ELEMENT:
- {
- if (core::stringw("startUpModel") == xml->getNodeName())
- StartUpModelFile = xml->getAttributeValue(L"file");
- else
- if (core::stringw("messageText") == xml->getNodeName())
- Caption = xml->getAttributeValue(L"caption");
- }
- break;
- default:
- break;
- }
- }
-
- if (xml)
- xml->drop(); // don't forget to delete the xml reader
-
// We can pass a model to load per command line parameter
if (argc > 1)
StartUpModelFile = argv[1];