-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More Examples please #189
Comments
your question is rather vague... for(tinyxml2::XMLElement* node=doc.FirstChildElement( "Root" )->FirstChildElement("InsideRoot");
node;
node=node->NextSiblingElement("InsideRoot")){
//do something
} |
Hello, using the library is not the problem. I don't get it set up. I am using cmake and using libxml is straight forward but with libxml2 the inclusion or the linking does not work. I don't remember correctly. It has been too long. Regards |
add_library(mylib STATIC include/tinyxml2.cpp)
add_executable(main src/main.cpp)
target_link_libraries(main mylib) You don't have to do a Static library, you can of course do shared... |
Thanks. How do I include the headers in the C++ files? |
Also, if it works for you, I still maintain that the easiest way to use TinyXML-2 is not as a library, but simply add the tinyxml2.cpp file directly into your project and just compile it with the rest of your code. |
I actually lump it in with all my libraries and make one big static library containing everything, but I want to eventually use the system libraries, though something didn't work right (i think GetText() was broken) so I just put it in with everything else. #include "path/to/tinyxml2.h" or are you asking about including things in a CmakeLists.txt file? |
More examples please especially how to go through something like all the items of a list.
The text was updated successfully, but these errors were encountered: