≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Double-using code of read xml-file
Posted by:
(you are not logged in)
Enter the missing letter in: "Internati?nal"
(you are not logged in)
Text:
[quote][b]Dron[/b] wrote: Source code: [code]include "SDK 1.4.2/include/irrlicht.h" include <iostream> pragma comment(lib, "SDK 1.4.2/lib/Win32-visualstudio/Irrlicht.lib") using namespace std; using namespace irr; using namespace io; void main() { //create xml reader, read information from xml-file and write to console io::IrrXMLReader* xml = io::createIrrXMLReader("scripts/Pripyat'.xml"); while(xml && xml->read()) { switch(xml->getNodeType()) { case io::EXN_TEXT: break; case io::EXN_ELEMENT: if (core::stringc("maps") == xml->getNodeName()) { cout<<endl<<xml->getAttributeValueAsFloat("X_rot")<<endl; } else if (core::stringc("points") == xml->getNodeName()) { cout<<endl<<xml->getAttributeValueAsFloat("m0_X")<<endl; } } } delete xml; ///////////////////////////////////////////////////////////////////////////////////////////////// //this code can't doing ////////////////////////////////////////////////////////////////////// //why? I don't know :( ////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////// io::IrrXMLReader* xml2 = io::createIrrXMLReader("scripts/p90big.xml"); while(xml2 && xml2->read()) { switch(xml2->getNodeType()) { case io::EXN_TEXT: break; case io::EXN_ELEMENT: if (core::stringc("guns") == xml2->getNodeName()) { cout<<endl<<xml2->getAttributeValueAsFloat("Z_pos")<<endl<<endl; } } } ///////////////////////////////////////////////////////////////////////////////////////////////// //end of haven't done code ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////// int i=0; cin>>i; }[/code][/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact