expat-parser

How do I replace/update the version of the expat library used by Apache?

独自空忆成欢 提交于 2019-12-11 14:12:06
问题 (Disclaimer: I just started using Linux and don't have much experience with configuring Apache and Python.) I have a rather common issue that is explained in more depth here http://code.google.com/p/modwsgi/wiki/IssuesWithExpatLibrary. Basically, I'm 99% sure that my main issue is that my Apache is using version 1.95.7 of the expat library, whereas my Python is using version 2.0.1 of the expat library; thus, when I use them together I get a segmentation fault. As is explained in the link at

Why does expat reject en dash character as invalid?

橙三吉。 提交于 2019-12-11 01:37:32
问题 In my XML input file I have the following line: <change beforeWhat="Literacy rate in L2: 50\%–75\%. Informally used" /> That character between 50\% and 75\% is not a hyphen but an en dash. When I parse in this XML file using expat in Python: postFixesDoc = minidom.parse('postFixes.xml') I get the following error: ExpatError: not well-formed (invalid token): line 35, column 99 where 35 is the line I quoted above from the XML input file, and 99 is the column of the % right before the en dash.

Python + Expat: Error on &#0; entities

◇◆丶佛笑我妖孽 提交于 2019-12-10 14:19:41
问题 I have written a small function, which uses ElementTree and xpath to extract the text contents of certain elements in an xml file: #!/usr/bin/env python2.5 import doctest from xml.etree import ElementTree from StringIO import StringIO def parse_xml_etree(sin, xpath): """ Takes as input a stream containing XML and an XPath expression. Applies the XPath expression to the XML and returns a generator yielding the text contents of each element returned. >>> parse_xml_etree( ... StringIO('<test>

gcc newly installed libraries (libexpat1-dev) not recognised in current terminal (debian)

早过忘川 提交于 2019-12-08 01:38:59
问题 I've spent quite a bit of time trying to get an expat based sample program to compile. I was receiving the following error message when I tried to compile gcc -Wall -lexpat line.c -o blah line.c: In function ‘main’: line.c:99:8: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘XML_Size’ [-Wformat] /tmp/ccUa3vfD.o: In function `printcurrent': line.c:(.text+0x42): undefined reference to `XML_SetDefaultHandler' line.c:(.text+0x4d): undefined reference to `XML

How to compile expat with iOS SDK 5.1?

一世执手 提交于 2019-12-06 13:17:40
How to compile expat with iOS SDK 5.1? I tried to adapt/upgrade from all older scripts, but nothing worked... Could anybody do it already? I found it! I used the following script: https://github.com/x2on/expat-ios The problem is that the command "xcode-select -print-path", used in the compilation script, is showing "/Developer" instead of the correct full path including "/Applications/Xcode.app/Contents/Developer". I just changed it and then it worked! The last XCode [SDK 5.1] moved the path of the developer tools and SDK to inside the XCode bundle. When trying to compile for iOS6.1 with the

gcc newly installed libraries (libexpat1-dev) not recognised in current terminal (debian)

[亡魂溺海] 提交于 2019-12-06 09:49:06
I've spent quite a bit of time trying to get an expat based sample program to compile. I was receiving the following error message when I tried to compile gcc -Wall -lexpat line.c -o blah line.c: In function ‘main’: line.c:99:8: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘XML_Size’ [-Wformat] /tmp/ccUa3vfD.o: In function `printcurrent': line.c:(.text+0x42): undefined reference to `XML_SetDefaultHandler' line.c:(.text+0x4d): undefined reference to `XML_DefaultCurrent' line.c:(.text+0x60): undefined reference to `XML_SetDefaultHandler' /tmp/ccUa3vfD.o: In

Libtool claims it does not support shared libraries during cross compilation

别说谁变了你拦得住时间么 提交于 2019-12-05 17:22:27
问题 I'm attempting to build the expat (2.0.0) XML parsing library for an ARM embedded machine running busybox 1.13, and during the ./configure, I get the error: checking if libtool supports shared libraries... no I've specified my gcc, g++, ar, ranlib, strip, etc and those all get found by the configure tool, and I've got the very latest libtool (2.4.2 at the time of this writing) running on Ubuntu 12.10, so why is it saying that libtool doesn't support shared libraries ? My configure command is

PHP XML Expat parser: how to read only part of the XML document?

笑着哭i 提交于 2019-12-03 16:31:21
I have an XML document with the following structure: <posts> <user id="1222334"> <post> <message>hello</message> <client>client</client> <time>time</time> </post> <post> <message>hello client how can I help?</message> <client>operator</client> <time>time</time> </post> </user> <user id="2333343"> <post> <message>good morning</message> <client>client</client> <time>time</time> </post> <post> <message>good morning how can I help?</message> <client>operator</client> <time>time</time> </post> </user> </posts> I am able to create the parser and print out the whole document, the problem is however

error at building libjingle on Mac OS X 10.7.2 like “error: string.h: No such file or directory”

谁说胖子不能爱 提交于 2019-12-02 09:41:52
I failed to build libjingle on Mac OS X 10.7.2. The output was the following when I run $path_to_swtoolkit/hammer.sh according to the README of libjingle. MBP17:talk rei25$ ~/Desktop/swtoolkit/hammer.sh scons: Reading SConscript files ... scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead. File "/Users/rei25/Desktop/swtoolkit/site_scons/site_init.py", line 203, in BuildEnvironmentSConscripts scons: done reading SConscript files. scons: Building targets ... ________Compiling build/dbg/obj/third_party/expat-2.0.1/lib/xmlparse.o third_party/expat-2.0.1

Geting xml data using xml parser expat

随声附和 提交于 2019-11-30 07:32:49
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; attribute[i]; i += 2) { printf(" %s= '%s'", attribute[i], attribute[i + 1]); } printf("\n"); depth++; } /