Roberts Webseite

Was Rob und Bert bewegt

  • Schrift vergrößern
  • Standard-Schriftgröße
  • Schriftgröße verkleinern
Willkommen auf der Startseite

XML parser for c++

E-Mail Drucken PDF

If you want to parse XML files with C++, Xerces-C++ is nice tool to do it. http://xerces.apache.org/xerces-c/

Some things you have to care about:

File encoding:  If not set to the correct file encoding, the parser will produce errors. Use "XMLUni::fgUTF8EncodingString" for UTF-8 encoded files.

Parsing XML from a string: Create a  MemBufInputSource with options MemBufInputSource((const XMLByte*)myxml.c_str(),myxml.length, "dummystring", false); Here myxml.length should be the bytes(!) not length of your xml string.

 Before you can transcode any UTF-16 given XMLCh*, you have to initialize the tools by adding XMLPlatformUtils::Initialize();

The includes used by Xerces are <stdexcept>,<list>,<sys/types.h>,<sys/stat.h>,<unitstd.h>,<errno.h> and for MemBufInputSource <xercesx/framework/MemBufInputSource.hpp>

You should use "namespace xercesc".

Zuletzt aktualisiert am Donnerstag, 07. Juli 2011 um 10:06 Uhr
 

Apache and PHP with Oracle Database

E-Mail Drucken PDF

Apparently, Apache and PHP need an extra plugin to handle connections with an external Oracle Database. This Plugin is called "oci8" and is installed as an option with PHP.

There are several ways to install oci8 plugin, on my ubuntu test system, I chose an easy one:

  • download instantclient-basic
  • download instantclient-sdk from the oracle website
  • unzip both
  • set some symlinks to the file with extension *.so.1.11 e.g. in the same directory
  • libocci.so -> libocci.so.*
  • libclntsh.so -> libclntsh.so.*
  • run "ldconfig"
  • install "pecl" if not done so far
  • run "pecl install oci8" (if everything is in the right place, it will finish without an error)
  • get the "libaio-dev"
  • in the php.ini file in your PHP folder, add an extra line with "extension=oci8" under the extensions area
After restarting your apache, you should now be able to connect to an Oracle database using oci8.

 

Zuletzt aktualisiert am Donnerstag, 07. Juli 2011 um 09:51 Uhr
 

Ballonfahrt über Karlsruhe

E-Mail Drucken PDF

Am 23.05. habe ich meine Ballonfahrt eingelöst, die ich zum Geburtstag geschenkt bekommen habe. Der Blick über Karlsruhe war fantastisch. Ich kann nur jedem empfehlen, auch mal eine Fahrt mitzumachen. Ein echtes Erlebnis.

Dabei sind schöne Bilder von Karlsruhe aus der Luft enstanden. Für einen Link zu den Bildern bitte mich anschreiben!

 

Aktuelle Bilder

E-Mail Drucken PDF

Im Januar waren der ASCK auf Hüttenwoche in Tignes, Frankreich. Schöne Bilder von diesem Urlaub gibts jetzt online.

 Hier gehts zu den Bildern!

 

Zuletzt aktualisiert am Donnerstag, 18. Juni 2009 um 21:55 Uhr
 

Quellen

Anmeldung


Umfragen

Wer ist online

Wir haben 1 Gast online

Werbung

Empfohlene Links: