Skip to content
qexpat
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
expat.c
expat.q

README.md

qexpat - q / kdb+ interface for expat xml parser

Build:

Install expat (probably it is already installed. at least on Mac is installed by the OS)

mac: gcc -dynamiclib -undefined dynamic_lookup -m32 -lexpat -o expat.so expat.c
linux: gcc -shared -m32 -lexpat -o expat.so expat.c

for 64bit use -m64.

You will need k.h to compile as above. See http://code.kx.com/wiki/Cookbook/ExtendingWithC for details and download link.

Install:

  • copy expat.so in the right location for your kdb+ setup ($QHOME/<l32|l64|m32|m64>/)
  • copy expat.q in a directory searchable by q (i use $QHOME/c)

Usage:

\l <install dir for expat.q>/expat.q  
xmlparse "<tag/>"  
xmlparse ("<tag attr1=\"1234\">";"text";"</tag>")  
xmlparse read0 `:a_file.xml
You can’t perform that action at this time.