is there a C library for validating XML against a XML schema? - c

See question. Also any links to example code or example code on how to validate an xml file against multiple schemas would be helpful.
EDT: Sorry forgot to mention that this is for LINUX

libxml2 is portable, pure C and implements XML Schema. It is also open-source (MIT license) and has an active developer community.

If you're targeting Windows platforms, you can use MSXML, but your use case has to allow COM.
EDIT: Apache has an open-source XML library called Xerces-C++ that supports schema validation. It's not C-compatible, but if you can get away with using C++, it should do what you need.

Related

Programmatically getting Apache Camel components operations, parameters, options decriptions

Is there a way to get any Apache Camel component "metadata" using Java code, like the list of options and other parameters and their types? I think some automatic help builder was mentioned somewhere that might be of use for this task without using reflection.
A way to get the registered components of all types (including data formats and languages) with java code is also sought. Thanks
Yeah take a look at the camel-catalog JAR which includes all such details. This JAR is what the tooling uses such as some of the Maven tooling itself, or IDE plugs for IntelliJ or Eclipse etc. The JAR has both Java API and metadata files embedded in the JAR you can load.
At runtime you can also access this catalog via RuntimeCamelCatalog which you can access via CamelContext. The runtime catalog is a little bit more limited than CamelCatalog as it has a view of what actually is available at runtime in the current Camel application.
Also I cover this in my book Camel in Action 2nd edition where there is a full chapter devoted on Camel tooling and how to build custom tooling etc.
This is what I've found so far
http://camel.apache.org/componentconfiguration.html

Solr indexing support for NetCDF files?

I am brand new to Solr and NetCDF, and am working on a project that is very much out of my realm of expertise. So I don't know where to look for the best information. I currently have an installation setup and for now I am browsing the directories and configuration files to get familiar. Although I found a few resources and tutorials that have given me a general understanding of how to work with Solr, I do not know how to translate this information specific to working with NetCDF.
Are there any guides, books, or resources that provide information specific to my case? Does Solr/Lucene even support NetCDF indexing by itself? I would appreciate any advice/suggestions/input you might have.
Thanks in advance!
I do not know about solr, but for NetCDF You can use standard programs to extract the data for indexing. Tools exist for C, JAVA and Python (You're probably not interested in FORTRAN), so just dump the necessary data to something that can be read by solr and that's it.

Libcurl using C

I have created a database using Berkeley DB in C. Now I want to use a libcurl function to send the entries in the database to a server. Can anyone suggest me good examples to read which address somewhat similar scenarios or any other material. I researched a bit and the libcurl homepage has some examples, but I am not able to understand them properly, how to use it in my context. I need examples only for "C" language. thanks in advance.
See the libcurl tutorial for a overview of libcurl, You may also want to look at the easy api reference, as that's what you'll most likely be using

JAXB Naming Collision Salesforce Integration

I'm attempting to integrate with Salesforce using MyEclipse. The wizard fails because of a naming collision on a complex type "DescribeLayout". I need to write a JAXB binding file to ensure that the two interfaces that are created by the xjc compiler are in different packages, but I have absolutely no idea how to do this.
I do not have the URI's to the schemas that make up the WSDL, only the URN's.
This blog post shows how to append a suffix to type names to avoid this. I'm not a JAXB expert, but presumably there is a way to configure it to use a different package instead of a suffix.
http://blog.teamlazerbeez.com/2009/05/23/salesforcecom-partner-soap-api-jax-ws-tutorial-part-1/

Do you know a database written in Perl with DBI interface?

Do you know a database written purely in Perl with DBI interface?
Or what can be used if there is no MySql or Postgresql installed and I want to use Perl only?
Thank you.
Ok, I just wanted something that can be used with Catalyst.
What about SQLite? DBD::SQLite
I believe DBD::CSV is a simple DBD implementation that uses Text::CSV to persist data to CSV files.
That depends greatly on what you consider "database".
If you just want something to store your data, there's a number of Perl databases avialable. Some are listed here: http://www.perl.com/pub/a/2004/09/12/embedded.html
Tie::File
Berkley DB
SQLite
Please note that despite "SQLite is written in C" comments I saw here, the article explicitly states:
Conveniently, the DBI-driver for
SQLite, DBD::SQLite, already contains
the database engine itself as part of
the module - so installing this module
is all that is required to be able to
use SQLite from Perl.
However, NONE of the above is a real database engine, supporting transactions etc..., although some allow SQL-like query language access
I'm not aware of any real database engines implemented in Perl.
Perl rule 34:
If you can imagine it, there's a DBD
module for it ;)
http://search.cpan.org/search?m=module&q=DBD::&s=1
AFAIK there is no database in pure perl that is relational, it's not really economical; you might look in ACME on CPAN.
Essentially you have two choices: a pure perl module that provides a DBD package that wraps around, for example .txt, .csv, or .xml files.
If there is none, you could also implement a BDB/DBM style system of your own using pure perl, much like Ken Thompson did in C with DBM. It however, wouldn't be as complex as having SQL based relational database.
If you expect to use SQL, use an SQL based database.
DBD::DBM is a pure Perl database driver which is part of DBI itself since version 1.42 (April 2004). It can work with a variety of different database formats using the respective modules, e.g. BerkleyDB or SDBM_File (core module).
One needs to combine this with MLDBM to get a usable database (otherwise ony two columns per table are supported).
The documentation of DBD::DBM is quite extensive and provides a good overview of the different options and how to set it up.

Resources