Re: [xml] libxml2-2.5.7 on

Okey, I don't think building libxml is my thing to do really, if I'm
having trouble with more basic things =)

What I do is in a cpp file I implement:

#include <libxml/parser.h>

and then in a function I do:

void foobar() {
        string xmltext = [some kind of input, read an xml-file or get it
from a socket or something like that];
        xmlDocPtr pdoc = xmlParseMemory(xmltext.c_str(),
        xmlNodePtr node = xmlDocGetRootElement(pdoc);
        xmlAttrPtr attr;
        // here comes some tree parsing....

and in -> Project -> Properties -> Linker -> Input -> Additional
dependencies, I add libxml2.lib (and i've included its path in's
search path for libraries). I have other libs there such as kernel32.lib
and user32.lib etc...

Ain't doing anything else than that. Nothing. (okey, added the include
directory offcourse).


Sorry, haven't had any coffey yet, that'll be for the evening :-)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]