Best XML parser for C [closed] - c

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
We have to add a new interface to our existing C application. The new interface system requests to our C application and responses to interface will be XML files. We need find a way to read and write XML files. It seems there are many mapping tools available for Java and C++. I did not find anyone for C.
Please let me know if there is anyone suitable for C. We will be okay if it's commercial API as well.
Thanks

One of the most widely used is libxml2. You can take a look here.

It's been a while since I did anything in anger with XML in C but at the time the best offering was the Gnome XML library - libxml from www.xmlsoft.org.
Should be worth a look.
Cheers,
Dan

I've used Expat for some time now, which is great if you need a very fast streaming parser for C. I believe there are DOM and SAX extentions if you need them.

Related

Ask recommend ways that Lua cowork with C/C++? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Recently I learned Lua, we need it to co-work with existed C code(HTTP server).
From Lua books, we know that there maybe to way to make them co-working:
From Lua, you can wrap C code in share library(xxx.so) that Lua use require to import them.
From C, you can use existed Lua API to operate on lua_state, it's some trick but it works well.
I adopt both of them and everything seems great, by using Lua we can save a lot of time to implement our business logic. But I'm quite nervous about current architecture, although there was no serious problem in it, I always worried about it, if there was some thing happened, for example, serious performance bottleneck, memory related and so on.
Is anyone got rich experience in this, please give some some advice. Thanks.
Lua is designed to work well with both C and C++. The C API is meant for that.
You don't need to create and use shared libraries to extend Lua. It is the easiest way to extend the standard command line interpreter but it should be easy (if not easier) to link static C libraries for Lua in your own application.
If you want to see some examples of C libraries for Lua, see mine. There are many others.

Is there any Dictionary Library for C? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I would like to know if there is any dictionary library for C. A dictionary library, literally (It has nothing to do with python dictionaries (hashmaps)). With all the words of the english language, and with tools like...
"I want to print all words that begins with C and end with Y".
I'll not google it, because I really want to know your opinion, if there is any that is specifically good.
Thank you!
You might want to start by looking at Aspell. While it mostly functions as a spell-checker, Aspell also has support for using multiple dictionaries at once and intelligently handling personal dictionaries when more than one Aspell process is open at once. I don't believe you have to be connected to the Internet to use it as well.
Wiktionary might also be of any help. There are a lot of localized variations to support different languages and there will probably be a way to ask them to support your language of interest, if it is not already there.
There's amazing Wordnik API, if you don't mind using Internet for this task. The API is fairly easy and supports regex search. The method you are looking for is /words.{format}/search/{query}
It also has methods to retrieve meanings (/word.{format}/{word}/definitions), synonyms (/word.{format}/{word}/relatedWords), and many other things.
There currently are no C wrappers, although it's very easy to use API directly with libcurl and any JSON or XML parser.

Parsing HTML files in C - alternatives to libxml2 [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
So I want to create a web crawler in C. There are hardly any libraries to support this.
I can use libtidy to convert HTML to XHTML and get the HTML files using libcurl (which has decent documentation).
My problem is parsing the HTML files and getting all the links present in it. I know libxml2
is there but its extremely hard to understand because there is no good documentation for its API.
Should I even do this in C or go with another language like Java ?
Or are there any good alternatives to libxml2 ?
Parsing HTML requires basically just string manipulation.
But it's quite hard to do without an HTML or XML (if it's XHTML) parser.
As for the second part of the question I woudn't choose C for such task because even basic string operations are much complex than many other languages that support them natively.
I would go for a scripting lanuguage such Python, JavaScript, PHP...
Instead of using libcurl you'll invoke curl as a command line tool.
Btw: libcurl documentation is very good (in my opinion).

socket library for MS-DOS (C language) [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I need to write client and server applications for MS-DOS using C language.
I don't want to start from scratch and implement sockets.
Can you advice me library in which socket functionality is implemented and for which exist good manuals and examples.
I already tried mTCP library: I got source files from it, added sources from example file and tried to Compile in Turbo C, but it raises a lot of errors it will be very hard task for me to cope with them.
Try libnet. According to it's web page (http://libnet.sourceforge.net/) it supports DOS systems (djgpp compiler), though I personally haven't tried it on DOS.
There is also WATTCP: http://www.erickengelke.com/wattcp/
Have you tried that?

Which database is most easy to use with C language? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have a project to be made on "college counseling and admission" in C language and I'm confused whether to choose a database or the file management system in C for the data.
As I have no prior knowledge of connecting C with any of the databases around and also because I find the file handling in C some what difficult.
What would you recommend?
MYSQL has a pretty good and easy interface to be used with c.
You can write basic operations in 30-40 lines of c code.
File handling will not scale and would be difficult once you change your file structure and info. With a database you can keep changing your info logically by adding new tables and still reuse most of the code by just adding new table names.
mysql tutorial c in linux environment
I would use a .plist file and implement it into a UITableView using the .h and .m files. That is the easiest, most simple way to do it. You can keep adding rows to your plist file without having to also code the changes too!
Let me know if you have a better idea!

Resources