Questions tagged [expat-parser]

Expat is an XML parser library written in C

expat-parser
26 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
1 answer
7k views

ExpatError: no element found - Python script

Using OS X 10.6.8, libxml 2-2.7.8, libxslt-1.1.26, and python 2.6, I'm trying to run the tumblrRestore.py script linked here: https://github.com/hughsaunders/Tumblr-Restore/blob/master/tumblrRestore....
user1395079's user avatar
3 votes
1 answer
563 views

Including the Expat library in Visual Studio 2013

I've downloaded a copy of Expat 2.0.1, which is basically a bunch of .h and .c files (see the complete directory in the screenshot below). To add the library to the VS 2013 project I'm working on, I ...
Adam's user avatar
  • 9,346
2 votes
0 answers
122 views

Cannot link static library after upgrading gcc to version 10

I am developing a C application that uses the expat XML library. I have built expat from source and installed it under path /opt/libexpat-2.4.8. I build my program with something like (simplified wrt. ...
Giorgio's user avatar
  • 5,143
2 votes
1 answer
150 views

Expat, pure C. How to ignore mismatched tags?

I have a malformed XML (comes from a vendor, no realistic way to fix it). Working with an expat 2.2.9 (gcc 9) I was hoping to do my own stack of tags with a hierarchy and do a forceful closer of less ...
White Owl's user avatar
  • 337
1 vote
0 answers
124 views

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 ...
grant22's user avatar
  • 11
1 vote
0 answers
868 views

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 ...
Krishnamoorthy Ganapathy's user avatar
1 vote
1 answer
732 views

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 = '<doc>Glück<...
Steve's user avatar
  • 11
1 vote
0 answers
583 views

compile expat 2.0.0 with arm-linux-androideabi android ndk toolchain

I want to build expat 2.0.0 for arm-linux-androideabi with a toolchain from Android NDK. I use Centos 7, x86_64. My configure step seems to work PATH=$PATH:/media/qt5-qwt6/tools25/tools PATH=$PATH:/...
Andrea S.'s user avatar
1 vote
0 answers
309 views

How to Compile GPX Read Support into a C# Project (Using OGR/GPX Driver)?

When I throw the path to a GPX file to OSGeo.OGR.Ogr.Open(), I get null back instead of a populated DataSource. In my situation, I believe this is happening because I'm not building my OGR/GPX driver ...
Jeremy Friedman's user avatar
1 vote
0 answers
1k views

ImportError xml.parsers.expat does not work

I have a simple script that import xml.parsers.expat, that works fine if it is executed by command line. But if I call it using subprocess.call(python import-expat.py, shell=True) it does not work. ...
CodeIK's user avatar
  • 177
1 vote
0 answers
103 views

expat.redist in nuget deploys the wrong DLL

I have added the Nuget/Coapp package for Expat (https://github.com/coapp-packages/expat) to my Visual C++ 2012 project. The project is using the Unicode charset and I finally found where I configure ...
Christoph's user avatar
  • 1,984
1 vote
3 answers
399 views

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 ...
syed misba's user avatar
1 vote
2 answers
372 views

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's user avatar
1 vote
1 answer
456 views

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 ...
alkz's user avatar
  • 347
0 votes
0 answers
63 views

Example of unseting the handler while the libexpat parse is still in progress?

I'm trying to extract some fields from a very big XML file using libexpat. I want to stop the parser when all fields I needed are extracted. The documentation say that: Although handlers are ...
npsable's user avatar
  • 13
0 votes
1 answer
153 views

Expat c library XML schema validation

Does [Expat]https://libexpat.github.io/ c library parser can do the XML data validation against XML Schema Definition(XSD) like library Libxml2? Many thx!
Gavin Tian's user avatar
0 votes
0 answers
162 views

How to prevent expat from automatically substituting entities?

Say I have an expat parser instantiated like so: def on_character_data(data): print(data) parser = xml.parsers.expat.ParserCreate(encoding=encoding) ... parser.CharacterDataHandler = ...
midrare's user avatar
  • 2,546
0 votes
1 answer
298 views

How to initialize the class only once and retain the overidden properties in python

I am carrying out XML parsing for a list of XML files. I am using a module which overrides the XMLParser class of element tree. This is the code- import sys sys.modules['_elementtree'] = None try: ...
shweta's user avatar
  • 117
0 votes
1 answer
216 views

Confirming existence of a string in an xml table Lua

Good afternoon everyone, My problem is that I have 2 XML lists <List1> <Agency>String</Agency> </List1> and <List2><Agency2>String</Agency2><List2>. ...
Alexandru Ivan's user avatar
0 votes
0 answers
735 views

Parsing with Expat in C, how to read correct amount of chunk from xml document

Fellow Programmers, I searched the forum , but couldn't find answer to my problem. I am trying to parse 2 GB xml file in C using expat, here snippet from my code ( I have removed most of the part ...
Sarwesh Suman's user avatar
0 votes
1 answer
1k views

gdb building with expat

I can't seem to get the syntax right for building gdb on Windows 10 (mingw), with expat. I downloaded expat sources and had no problems building. The expat.h file is in /usr/local/include and the ...
Batdude's user avatar
  • 556
0 votes
2 answers
2k views

How to ignore mismatched tags while parsing xml in Python

I want to parse an XML file with Python. I don't need the hierarchical tag structure -- all I want is a simple SAX or Expat-based parser. However, they both fail with mismatched tag-related error ...
David Nemeskey's user avatar
0 votes
1 answer
1k views

Installing expat XML Parser to utilize bluetooth in arm board

hi I am a beginner as programmer so ,in advance, appreciate for you patience to understand what I wrote. I'm trying to cross-compile the bluetooth libraries. Device is an arm-processor board, and my ...
user4948978's user avatar
0 votes
1 answer
209 views

how to append,add,update and delete node from xml using expat in php

I am the new in php. And i want to parse xml into database. I tried this using DomDocument. But my friends suggest me to use expat2 parser. I googling for it but not the get the proper answers and ...
Umesh's user avatar
  • 11
0 votes
1 answer
1k views

Error when trying to use XML::Parser under modperl2 - Could not load module

I've run into a problem when using XML::Parser under our modperl setup in production (on AIX 5.3). It works fine in development but fails on production with the following error: [Tue Apr 03 08:...
Nick's user avatar
  • 2,458
0 votes
1 answer
1k views

Data extraction from cdata using expat in C

I am able to parse XML successfully, but I am facing probelm while extracting data from CDATA. For this, I am using XML_SetCdataSectionHandler(parser,CDATAstart,CDATAend). And by using this, my ...
user1307353's user avatar