473,320 Members | 1,802 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

XPATH implementation in C

Hello,

I would like to use XPATH in a C program to retrieve values from XML
documents. Did anyone tried this and can give me some advice?

Cheers,
Locusta

Nov 23 '05 #1
2 5568
"Locusta" <lo***********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hello,

I would like to use XPATH in a C program to retrieve values from XML
documents.
XPATH is a language created specifically to perform this
task. Why do you want to try to combine it with C?
Did anyone tried this and can give me some advice?


If I wanted to use XPATH, I'd just use it. I'd start
here: http://www.w3schools.com/xpath/default.asp

Perhaps you want to make a C program that generates
XPATH code. That's very doable. The above link will
teach the XPATH grammar, syntax, etc.

If you need help with (standard) C, we can help.
For help with XPATH, you'll need to look elsewhere.
www.groups.google.com can help with locating
newsgroups on particular topics.

Purpose of comp.lang.c:
http://www.ungerhu.com/jxh/clc.welcome.txt

C FAQ:
http://www.eskimo.com/~scs/C-faq/top.html

-Mike
Nov 23 '05 #2
In article <dM***************@newsread1.news.pas.earthlink.ne t>,
Mike Wahler <mk******@mkwahler.net> wrote:
I would like to use XPATH in a C program to retrieve values from XML
documents.


XPATH is a language created specifically to perform this
task. Why do you want to try to combine it with C?


Presumably he wants to retrieve XML nodes using XPaths and then
process them in C.

This presupposes the use of some representation of XML nodes as C
structures, probably produced by a parser.

There are several libraries that can do this (I have one myself which
I have not yet had time to tidy up and release). Look at libxml
(http://xmlsoft.org/) or Xalan-C++ (http://xml.apache.org/xalan-c/).
I'm not sure whether the latter can be easily used in C.

-- Richard
Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: bdinmstig | last post by:
I refined my attempt a little further, and the following code does seem to work, however it has 2 major problems: 1. Very limited support for XPath features Basic paths are supported for...
7
by: Sebastian Petzelberger | last post by:
Hi group, please give me an example of a xpath with regex or better a link with examples. Thanks in advance, Sebastian
2
by: kj | last post by:
Suppose I have some XML document that contains tags of the form <... xmlns:foo="http://www.bar.org/foo"> <... xmlns:foo="baz"> <... xmlns:frobozz="http://www.bar.org/foo"> What's the...
4
by: Michel Gutierrez | last post by:
Hi, I have an XML document from which the xpath expression "A/B/C/D/E/F" selects a node. I would expect, in the same document, the expression "descendant::C/D/E/F" to select at least the same...
0
by: Oleg Paraschenko | last post by:
Hello, might be of some interest: find with XPath over file system http://uucode.com/texts/xfind/index.html <quote> The standard UNIX utility find now supports XPath:
3
by: Alexander Gräf | last post by:
Hello, I'm stuck with a simple problem, for which I don't have a solution. I basically have an XML file containing fragments of plain text and html, in several languages: <?xml version="1.0"...
18
by: jacksu | last post by:
I have a simple program to run xpath with xerces 1_2_7 XPathFactory factory = XPathFactory.newInstance(); XPath xPath = factory.newXPath(); XPathExpression xp = xPath.compile(strXpr);...
1
by: Oleg Paraschenko | last post by:
Hello, those who are still interested in "lisp vs xml" and "xml is a poor copy of s-expressions" issues, might find my recent writings interesting: Towards s-expression based XPath/XSLT...
1
by: newToAjax | last post by:
I have created an ajax application which retrievs an xml file and fills in the tab fields on the form.The code works fine in IE while its does not in Mozilla. Can you please let me know if i have to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.