expat-parser

How to install XML::Parser without expat-devel?

只谈情不闲聊 提交于 2019-11-29 12:16:08
问题 XML::Parser fails to build on a quite fresh 64-bit Debian box. After issuing cpan XML::Parser , cpan fails with lots of errors about Expat.c and Expat.xs: [...] Expat.xs:2182: error: ‘CallbackVector’ has no member named ‘skip_until’ Expat.c: In function ‘XS_XML__Parser__Expat_Do_External_Parse’: Expat.c:2904: error: ‘XML_Parser’ undeclared (first use in this function) Expat.c:2904: error: expected ‘;’ before ‘parser’ Expat.xs:2194: error: ‘parser’ undeclared (first use in this function) make

Geting xml data using xml parser expat

泄露秘密 提交于 2019-11-29 09:54:14
问题 I have managed to parse ok. But now I am having trouble getting the values that I need. I can get the element and the attributes. But cannot get the values. I would like to get the value of frame in this xml it is 20. /* track the current level in the xml tree */ static int depth = 0; /* first when start element is encountered */ void start_element(void *data, const char *element, const char **attribute) { int i; for(i = 0; i < depth; i++) { printf(" "); } printf("%s", element); for(i = 0;