Questions tagged [expat-parser]

Expat is an XML parser library written in C

Expat is a stream-oriented XML parser. The programming model is based on handlers for patterns such as start tags that the parser finds in the XML document. Expat itself is written in C, but there are bindings for many languages.

94 questions
2
votes
1 answer

Losing whitespace around escaped symbols in CDATA using Expat XML parser in C++

I'm using XML to send project information between applications. One of the pieces of information is the project description. So I have: Test & spaces around&some & amps! Or: "Test & spaces…
TheWalruss
  • 33
  • 3
2
votes
3 answers

How to fix non-compliant HTML so Expat will parse it (htmltidy not working)

I'm trying to scrape information from http://www.nfl.com/scores (in particular, find out when a game is over so my computer can stop recording it). I can download the HTML easily enough, and it makes this claim about compliance with…
Norman Ramsey
  • 198,648
  • 61
  • 360
  • 533
2
votes
1 answer

expat function XML_StartElementHandler - how to work with it?

I'm writing xml parser using expat . just saw this : XML_SetElementHandler XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end I don't understand what should it do I see that it's a pointer to a function…
user1386966
  • 3,302
  • 13
  • 43
  • 72
2
votes
1 answer

cygwin perl error cannot load expat.dll

c:\>perl -de 1 Loading DB routines from perl5db.pl version 1.32 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(-e:1): 1 DB<1> require XML::Parser::Expat Can't load…
prongs
  • 9,422
  • 21
  • 67
  • 105
2
votes
2 answers

How to compile expat with iOS SDK 5.1?

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?
Wagner Patriota
  • 5,494
  • 26
  • 49
1
vote
2 answers

C compiler cannot create executables

I installed OSx 1.6 and 1.7 (lion) today (1.5 was installed before). After this i reinstalled xcode and command line tools. Unistalled and cleand all ports from macport. When i try to install something from macports there is an error: (reinstalling…
kaz
  • 1,943
  • 1
  • 13
  • 19
1
vote
2 answers

Validate XML document with expat

I have a problem with XML validation with expat. I have not found document or wiki that can help me to validate my xml document. Is it possible to validate my XML document via xml schema (xsd file) with libexpat and a C program? If the response is…
developer
  • 4,744
  • 7
  • 40
  • 55
1
vote
3 answers

Expat parser - c++ -Exception handling

I have registered three handlers with expat parser: - start -end - text And from the main program, I read the xml file, buffer it and invoke XML_Parse API. Something like this: try { if( ! XML_Parse (....)) { // throw user-defined expection…
syed misba
  • 41
  • 1
1
vote
0 answers

Does the Android SDK 33 have a dependency of Expat 2.4.8?

I am compiling my android application using the Android SDK Platform 33. When running static analysis of the apk I am seeing references to the library Expat version 2.4.8. This version has a known vulnerability and I would like to have the newest…
1
vote
1 answer

Expat XML Generator APIs

Is Expat more popular as an xml parser or as an xml generator? Please let me know some basic 1-2 APIs if using Expat as an xml generator.
user911747
  • 69
  • 1
  • 1
  • 5
1
vote
0 answers

Scan image vulnerability- CVE-2022-40674 for expat package

We are trying to build container image for GCP cloud run service from base image of python:3.9-slim and we could see that there is a recent vulnerability for the expat package(CVE-2022-40674) which is stopping the whole CI/CD process. we tried to…
1
vote
1 answer

C++ Expat and XML parsing

I am new to using expat. I am trying to figure out how XML_SetUserData is intended to do. In my case, I have a list of class A objects and I need to populate this list as I parse the XML stream. So far, I was planning on using a singleton to…
reza
  • 5,972
  • 15
  • 84
  • 126
1
vote
1 answer

Parsing ampersands with expat fails. Invalid token?

I get an expat error when parsing specific characters only. Other HTML code is parsed just fine. I'm using the UTF-8 library of expat libexpatMT.lib and I'm working with char and std::string in a wrapper. No wide chars etc. used. // The ampersand…
Smamatti
  • 3,901
  • 3
  • 32
  • 43
1
vote
0 answers

How does Python xml parser detect encoding (utf-8 vs utf-16)?

The Python XML Parser can parse byte strings of various encodings (Even if there is no encoding specified in the XML header): from xml.etree import ElementTree as ET xml_string = 'Glück' xml_utf_8 = xml_string.encode('utf-8') xml_utf_16…
1
vote
1 answer

Importing pyFileMaker complains about EXPAT library

I've just downloaded pyFileMaker. I copied the directory PyFileMaker into the dir Lib under Python31 directory, but when I simply include the module FMServer with this line: from PyFileMaker import FMServer I get this error Traceback (most recent…
alkz
  • 337
  • 2
  • 7
  • 17