
01.07.2009, 21:25
|
|
Участник форума
Регистрация: 04.02.2009
Сообщений: 132
Провел на форуме: 350627
Репутация:
1
|
|
Сообщение от t4Nk
советую pugixml
использовать так
Код:
#include <iostream>
#include "pugixml.hpp"
using namespace pugi;
using namespace std;
int main(int argc, char *argv[]) {
xml_document doc;
char xml[] = "<root><item><a>Hello world!</a></item></root>";
doc.load(xml);
xml_node item = doc.child("root").child("item").child("a");
cout << item.child_value(); // Hello world!
return 0;
}
удачи (:
Спасибо !
Проблема такая скачал я эту штуку папку src/ кинул на сервер компелю
g++ xml.cpp -o xml
выдает
Код:
/var/tmp//ccS1gZxe.o(.text+0x1bf): In function `main':
: undefined reference to `pugi::xml_document::xml_document()'
/var/tmp//ccS1gZxe.o(.text+0x246): In function `main':
: undefined reference to `pugi::xml_document::load(char const*, unsigned int)'
/var/tmp//ccS1gZxe.o(.text+0x25f): In function `main':
: undefined reference to `pugi::xml_node::child(char const*) const'
/var/tmp//ccS1gZxe.o(.text+0x275): In function `main':
: undefined reference to `pugi::xml_node::child(char const*) const'
/var/tmp//ccS1gZxe.o(.text+0x28b): In function `main':
: undefined reference to `pugi::xml_node::child(char const*) const'
/var/tmp//ccS1gZxe.o(.text+0x299): In function `main':
: undefined reference to `pugi::xml_node::child_value() const'
/var/tmp//ccS1gZxe.o(.text+0x2bc): In function `main':
: undefined reference to `pugi::xml_document::~xml_document()'
/var/tmp//ccS1gZxe.o(.text+0x2de): In function `main':
: undefined reference to `pugi::xml_document::~xml_document()'
что это может быть ?
|
|
|