XPATH implementation in C

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Locusta

    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

  • Mike Wahler

    #2
    Re: [OT, redirect, welcome msg] XPATH implementation in C

    "Locusta" <locusta74ster@ gmail.com> wrote in message
    news:1132737428 .017164.159470@ f14g2000cwb.goo glegroups.com.. .[color=blue]
    > Hello,
    >
    > I would like to use XPATH in a C program to retrieve values from XML
    > documents.[/color]

    XPATH is a language created specifically to perform this
    task. Why do you want to try to combine it with C?
    [color=blue]
    > Did anyone tried this and can give me some advice?[/color]

    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:


    C FAQ:


    -Mike


    Comment

    • Richard Tobin

      #3
      Re: [OT, redirect, welcome msg] XPATH implementation in C

      In article <dMWgf.413$Hk1. 289@newsread1.n ews.pas.earthli nk.net>,
      Mike Wahler <mkwahler@mkwah ler.net> wrote:
      [color=blue][color=green]
      >> I would like to use XPATH in a C program to retrieve values from XML
      >> documents.[/color]
      >
      >XPATH is a language created specifically to perform this
      >task. Why do you want to try to combine it with C?[/color]

      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

      Comment

      Working...