C/C++ OCI XML support examples

Hi all,
I'm trying to find some simple C/C++ examples of accessing XMLType columns from OCI. I'm interested in examples that show the basics like querying an XMLType column and inserting values into an XMLType column. I'm mainly interested in examples that deal with the XMLType column when the data is stored in the database as a CLOB though I'm not sure if the client side really cares about that.
My application is based on the 9i OCI client since we still need to support that so I think that some of the newer OCI XML calls will not be available. I'm already quite familiar with programming in OCI, and I'm in the process of adding support for XML to our applicaiton so I just need some sample code that shows the basics and then hopefully I can figure things out from there.
Any help would be much appreciated.
Thanks,
Nick

It's possible to get XMLTYPE column in OCI without converting them to string or clob. I was able to do it by taking just the XDK headers and using only those functions declared there which are exposed by oci.dll directly. Here's the comment from my code:
<tt>
// Only calls which are defined in xmlproc.h (in xdb/include) as
// #define XmlXYZ which take an xctx as first param, and cast back
// xctx into xmlctxhead, then access the struct of function pointers,
// are accessible to a pure OCI / Instance Client app.
</tt>
Crystal clear, no? ;-)
The code below could be compiled with Instant Client augmented with xdk/include/*.h. It depends on a few classes and methods not listed (it's part of a bigger file), but if you program with OCI you should be able to replace them with something that works. It's quite rough, my own experimentation, before moving on to wrap all this messy C-code into nicer looking C++, but it shows that it can be done. Notice you need to init on Object mode, and given that it uses undocumented functions for the parsing, probably not supported at all by Oracle.
Anyways, I hope its useful to someone. --DD
PS: Sorry, looks like the forum garbles the code a little in HTML. don't know how to fix that. Maybe look at the source for the HTML.
<tt>
#include <xmlotn.h>
* \brief Replacement for official XmlSaveDom not accessible to Instant-Clients
* This method wraps calls to the unofficial XmlSaveDomVA method exposed by
* Oracle contexts, to work around the fact that XmlSaveDom is not accessible
* to applications deployed against Oracle's Instant Client runtime.
* The real XmlSaveDom may be taking advantage of more undocumented key/value
* pairs supported by underlying XmlSaveDomVA methods, to do proper error
* handling possibly, which may explain why XmlSaveDomVA does not return the
* number of bytes written, as advertised by XmlSaveDom's documentation.
static xmldocnode* myXmlLoadDom(xmlctx* xctx, xmlerr* err, ...) {
va_list v;
va_start(v, err);
xmldocnode*const rc = XmlLoadDomVA(xctx, err, v);
va_end(v);
return rc;
static xmldocnode* load_dom_from_string(
xmlctx* xctx, const char* doc_string, ub4 string_len
SystemTimer timer;
xmlerr err = XMLERR_OK;
xmldocnode*const doc = myXmlLoadDom(
xctx, &err,
"buffer", doc_string,
"buffer_length", string_len,
NULL // sentinel marking end of key/value pairs
if (err != XMLERR_OK || doc == NULL) {
cerr << "Error parsing XML string" << endl;
// throw?
cout << "loaded dom in " << timer << endl;
return doc;
static xmldocnode* load_dom_from_file(
xmlctx* xctx, const char* filename
SystemTimer timer;
xmlerr err = XMLERR_OK;
xmldocnode*const doc = myXmlLoadDom(
xctx, &err,
"file", filename,
NULL // sentinel marking end of key/value pairs
if (err != XMLERR_OK || doc == NULL) {
cerr << "Error parsing XML file " << filename << endl;
// throw?
cout << "loaded dom in " << timer << endl;
return doc;
static ubig_ora myXmlSaveDom(xmlctx* xctx, xmlerr* err, xmlnode* root, ...) {
SystemTimer timer;
va_list v;
va_start(v, root);
const ubig_ora rc = XmlSaveDomVA(xctx, err, root, v);
va_end(v);
cout << "saved dom in " << timer << endl;
return rc;
// TODO: On truncation, retry with increasingly larger heap buffer
// and re-attempt serialization.
static std::string save_dom_to_string(
xmlctx* xctx, xmlnode* root,
bool add_xmldecl = true,
ub4 indent_step = 2,
ub4 indent_level = 0,
bool prune_children = false,
const char* eol = "\n"
xmlerr err = XMLERR_OK;
const ub4 max_len = 2048;
oratext doc_string[max_len] = {0};
boolean xmldecl = add_xmldecl? TRUE: FALSE;
boolean prune = prune_children? TRUE: FALSE;
const ubig_ora byte_count = myXmlSaveDom(
xctx, &err, root,
"buffer", doc_string,
"buffer_length", max_len,
"xmldecl", xmldecl, // ignored
"prune", prune,
// Using UTF-16 yields an empty string.
// Using AL32UTF8 adds XML decl previously missing (with encoding="UTF-8")
// despite requesting no xmldecl explicitly (was ignored anyway...), but
// only if passing the doc node, not the root node.
"output_encoding", "AL32UTF8",
//"eol", eol, // LPX-00019: property "eol" unknown
"indent_step", indent_step,
"indent_level", indent_level, // ignored
NULL // sentinel marking end of key/value pairs
// Number of bytes written not returned, as advertised.
// So deduce silent truncation from the end of the string
// (nor is err set to XMLERR_SAVE_OVERFLOW...)
const bool was_truncated = doc_string[max_len - 1] == '\0'
&& doc_string[max_len - 2] != '\0';
const size_t actual_len = strlen((const char*)doc_string);
cout << "byte_count return = " << byte_count
<< "; actual length = " << actual_len
<< "; truncated = " << (was_truncated? "true": "false")
<< endl;
if (err == XMLERR_OK && actual_len > 0) {
if (was_truncated) {
cerr << "Truncation during XML serialization to a string" << endl;
return std::string((const char*)doc_string, actual_len);
return std::string();
static void xml_dom_basics_main(int argc, const char* argv[]) {
SystemTimer* disconnect_timer; // time "shutdown"
Environment env(OCI_OBJECT);
env.connect(zusername, zpassword, zdatabase);
SystemTimer timer; // don't time connecting to DB
OCIError*const errhp = env.errhp;
xmlctx*const xctx = OCIXmlDbInitXmlCtx(
env.envhp, env.svchp, errhp,
(ocixmldbparam *)0, 0
if (!xctx) {
checkerr(OCI_ERROR, errhp);
// TODO: Manipulate XML context???
// FIXME: Instant Client SDK does not ship with xml.h...
// Following call compiles (because include xmlotn.h) but doesn't link
// with Instant Client SDK, because oci.dll doesn't export this symbol.
//const boolean is_unicode = XmlIsUnicode(xctx);
** Same issue here, XmlLoadDom not available from oci.dll...
// Parse "dummy" document
xmlerr err = XMLERR_OK;
oratext doc_string[] = "<dummy/>";
xmldocnode* doc = XmlLoadDom(
xctx, &err,
"buffer", doc_string,
"buffer_length", sizeof(doc_string)-1,
"validate", TRUE,
NULL // sentinel indicating last key/value pair
if (!doc) {
cerr << "XML parsing failed: rc = " << err << endl;
// Only calls which are defined in xmlproc.h (in xdb/include) as
// #define XmlXYZ which take an xctx as first param, and cast back
// xctx into xmlctxhead, then access the struct of function pointers,
// are accessible to a pure OCI / Instance Client app.
oratext* dummy_root = 0;//[] = "dummy";
oratext* dummy_uri = 0;
xmldtdnode* dummy_dtd = 0;
xmlerr err = XMLERR_OK;
xmldocnode* doc = XmlCreateDocument(
xctx, dummy_uri, dummy_root, dummy_dtd, &err
if (!doc) {
cerr << "XML parsing failed: rc = " << err << endl;
} else {
oratext root_tag[] = "root";
xmlelemnode* root = XmlDomCreateElem(xctx, doc, root_tag);
XmlDomAppendChild(xctx, doc, root);
oratext child_tag[] = "child";
xmlelemnode* child = XmlDomCreateElem(xctx, doc, child_tag);
XmlDomAppendChild(xctx, root, child);
xmltextnode* text = XmlDomCreateText(xctx, doc, (oratext*)"foo");
XmlDomAppendChild(xctx, child, text);
// Add a second child, but without text
child = XmlDomCreateElem(xctx, doc, child_tag);
XmlDomAppendChild(xctx, root, child);
xmlelemnode* root2 = XmlDomGetDocElem(xctx, doc);
assert(root == root2);
xmlnodelist* children = XmlDomGetElemsByTag(
xctx, root, (oratext*)"child"
ub4 child_count = XmlDomGetNodeListLength(xctx, children);
if (child_count > 0) {
xmlnode* child0 = XmlDomGetNodeListItem(xctx, children, 0);
if (XmlDomHasChildNodes(xctx, child0)) {
// I assume it's text
xmlnode* text0 = XmlDomGetFirstChild(xctx, child0);
const oratext* value = XmlDomGetNodeValue(xctx, text0);
ub4 value2_length = 0;
const oratext* value2 = XmlDomGetNodeValueLen(xctx, text0, 0, 0, &value2_length);
cout << "value = " << value << "; #value2 = " << value2_length << endl;
XmlDomFreeNodeList(xctx, children);
oratext doc_string[2048];
const ubig_ora byte_count =
(*XML_CB(xctx)->XML_SAVE_DOM_VA_CB)(
//XmlSaveDomVA(
xctx, &err, root,
"buffer", doc_string,
"buffer_length", 2048,//sizeof(doc_string) - 1,
NULL
cout << "byte_count = " << byte_count << endl;
if (err == XMLERR_OK && byte_count > 0) {
doc_string[sizeof(doc_string) - 1] = '\0'; // just in case
cout << "doc = \n" << doc_string << endl;
const std::string root_string = save_dom_to_string(xctx, root);
cout << "root = \n" << root_string << endl;
const std::string doc_string = save_dom_to_string(xctx, doc, false, 2, 2, false, "\r\n");
cout << "doc = \n" << doc_string << endl;
xmldocnode* doc2 = load_dom_from_string(
xctx, doc_string.c_str(), (ub4)doc_string.size()
const std::string doc_string2 = save_dom_to_string(xctx, doc2);
cout << "doc2 = \n" << doc_string2 << endl;
XmlFreeDocument(xctx, doc);
XmlFreeDocument(xctx, doc2);
// Try accessing freed doc on purpose (Hmmm, works...)
//const std::string doc_string3 = save_dom_to_string(xctx, doc2);
//cout << "doc3 = \n" << doc_string3 << endl;
// 28 KB file. If file doesn't exist, simply prints out an error
cout << "\n\n===== Loading / parsing 28 KB XML file =====" << endl;
xmldocnode* xsd = load_dom_from_file(xctx, "georaster.xsd");
cout << "XSD = \n" << save_dom_to_string(xctx, xsd, false, 2, 2, true, "\r\n");
XmlFreeDocument(xctx, xsd);
// 1,870 KB
cout << "\n\n===== Loading / parsing 1,870 KB XML file =====" << endl;
xmldocnode* witsml1 = load_dom_from_file(
xctx, "medium.xml"
cout << "WITSML1 = \n" << save_dom_to_string(xctx, witsml1, false, 2, 2, true);
XmlFreeDocument(xctx, witsml1);
// 68,911 KB
cout << "\n\n===== Loading / parsing 68,911 KB XML file =====" << endl;
xmldocnode* witsml2 = load_dom_from_file(
xctx, "big.xml"
cout << "WITSML2 = \n" << save_dom_to_string(xctx, witsml2, false, 2, 2, true);
XmlFreeDocument(xctx, witsml2);
OCIXmlDbFreeXmlCtx(xctx);
cout << "xml_dom_basics_main: " << timer << endl;
// For some reason, disconnecting after reading a large XML file
// is very slow... Loading the 68 MB file above, in about 8 seconds,
// results in the shutdown to take around 28 seconds!!!
disconnect_timer = new SystemTimer; // time "shutdown"
cout << "\n\nDisconnecting from DB, terminating OCI environment... " << endl;
cout << "'shutdown' time: " << *disconnect_timer << endl;
delete disconnect_timer;
template <class T> T* checkxml(T* node, xmlerr err) {
xmlnode* xml_node = node;
if (!xml_node) {
throw std::runtime_error("null node");
if (err != XMLERR_OK) {
throw std::runtime_error("XML error code returned");
return node;
static void xml_dom_select_main(int argc, const char* argv[]) {
const oratext charset[] = "AL32UTF8";
Environment env(OCI_OBJECT, charset, charset);
env.connect(zusername, zpassword, zdatabase);
SystemTimer timer; // don't time connecting to DB
OCIError*const errhp = env.errhp;
xmlctx*const xctx = OCIXmlDbInitXmlCtx(
env.envhp, env.svchp, errhp,
(ocixmldbparam *)0, 0
if (!xctx) {
checkerr(OCI_ERROR, errhp);
throw std::runtime_error("Cannot initialize XML context");
// Allocate Statement Handle
OCIStmt* selecthp = 0;
checkerr(
OCIHandleAlloc(
(dvoid *) env.envhp, (dvoid **) &selecthp,
OCI_HTYPE_STMT, 0, 0
env.errhp
// Prepare Statement
const char *const sql = "SELECT id, doc FROM xml_tab";
checkerr(
OCIStmtPrepare(
selecthp, env.errhp,
(const OraText*)sql, (ub4) strlen(sql),
(ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT
env.errhp
// Defines
ub4 id = 0;
OCIDefine* define_id = 0;
checkerr(
OCIDefineByPos(
selecthp, &define_id, env.errhp, 1, &id, sizeof(id), SQLT_UIN,
(dvoid *) 0, (ub2 *) 0, (ub2 *) 0, OCI_DEFAULT
env.errhp
OCIDefine* define_doc = 0;
checkerr(
OCIDefineByPos(
selecthp, &define_doc, env.errhp, 2, 0, sizeof(point_typ), SQLT_NTY,
(dvoid *) 0, (ub2 *) 0, (ub2 *) 0, OCI_DEFAULT
env.errhp
OCIType* xmltype_tdo = 0;
const oratext xmltype_name[] = "XMLTYPE";
checkerr(
OCITypeByName(
env.envhp, env.errhp, env.svchp,
0, 0, // schema name (default schema when 0)
xmltype_name, (ub4)strlen((const char*)xmltype_name),
0, 0, // version name (ignored)
OCI_DURATION_SESSION,
OCI_TYPEGET_ALL,
&xmltype_tdo // connection (service specific)
env.errhp
xmldocnode* doc = 0;
ub4 doc_size = 0;
OCIInd* p_doc_ind = 0;
ub4 doc_ind_size = 0;//(ub4)sizeof(point_ind);
checkerr(
OCIDefineObject(
define_doc, env.errhp, xmltype_tdo,
//(void**)&p_pt, &pt_size, (void**)&p_pt_ind, &pt_ind_size
(void**)&doc, 0, (void**)&p_doc_ind, 0
env.errhp
// Execute (scalar) Select Statement
checkerr(
OCIStmtExecute(
env.svchp, selecthp, env.errhp, (ub4) 0 /* specific to select... */, (ub4) 0,
(CONST OCISnapshot *) NULL, (OCISnapshot *) NULL,
OCI_DEFAULT
env.errhp,
OCI_NO_DATA // TODO: Test with a select that returns no rows,
// and specifying 0 iters, to see if it returns
// OCI_SUCCESS, or OCI_NO_DATA
// TODO: Describe the select-list.
// TODO: Fix this screwed up logic!
sword fetch_rc = OCI_NO_DATA;
size_t row_count = 0;
do {
checkerr(
fetch_rc = OCIStmtFetch2(
selecthp, env.errhp, (ub4)1,
(ub2)OCI_FETCH_NEXT, (sb4)0, (ub4)OCI_DEFAULT
env.errhp, OCI_NO_DATA
if (fetch_rc != OCI_NO_DATA) {
++row_count;
if (p_doc_ind && *p_doc_ind == OCI_IND_NULL) {
cerr << "\nXML doc#" << id << " is NULL" << endl;
continue;
cout << "\nXML doc#" << id << ":\n" << save_dom_to_string(xctx, doc) << endl;
while (fetch_rc != OCI_NO_DATA);
if (doc != NULL) {
// When last row contained no document (NULL in XMLTYPE column),
// the doc pointer is somehow reset to 0, and OCIObjectFree complains
// about it: OCI-21560: argument 3 is null, invalid, or out of range
checkerr(
OCIObjectFree(env.envhp, env.errhp, doc, 0),
env.errhp
// Necessary to free documents when selecting XMLTYPE,
// sinced used OCIObjectFree above?
//XmlFreeDocument(xctx, doc);
// Free Statement Handle
checkerr(
OCIHandleFree(selecthp, OCI_HTYPE_STMT),
env.errhp
OCIXmlDbFreeXmlCtx(xctx);
cout << "xml_dom_select_main: " << timer << endl;
static void xml_dom_insert_main(int argc, const char* argv[]) {
Environment env(OCI_OBJECT);
env.connect(zusername, zpassword, zdatabase);
SystemTimer timer; // don't time connecting to DB
OCIError*const errhp = env.errhp;
xmlctx*const xctx = OCIXmlDbInitXmlCtx(
env.envhp, env.svchp, errhp,
(ocixmldbparam *)0, 0
if (!xctx) {
checkerr(OCI_ERROR, errhp);
throw std::runtime_error("Cannot initialize XML context");
xmlerr err = XMLERR_OK;
xmldocnode* doc = checkxml(XmlCreateDocument(xctx, 0, 0, 0, &err), err);
xmlelemnode* root = checkxml(XmlDomCreateElem(xctx, doc, (oratext*)"root"), err);
XmlDomAppendChild(xctx, doc, root);
xmlattrnode* version = checkxml(XmlDomCreateAttr(xctx, doc, (oratext*)"version", (oratext*)"0.1"), err);
XmlDomAppendChild(xctx, root, version);
xmlelemnode* child = checkxml(XmlDomCreateElem(xctx, doc, (oratext*)"child"), err);
XmlDomAppendChild(xctx, root, child);
xmltextnode* text = checkxml(XmlDomCreateText(xctx, doc, (oratext*)"baz"), err);
XmlDomAppendChild(xctx, child, text);
// Add a second child, but without text
child = checkxml(XmlDomCreateElem(xctx, doc, (oratext*)"child"), err);
XmlDomAppendChild(xctx, root, child);
xmlattrnode* empty = checkxml(XmlDomCreateAttr(xctx, doc, (oratext*)"empty", (oratext*)"true"), err);
XmlDomAppendChild(xctx, child, empty);
const std::string doc_string = save_dom_to_string(xctx, doc);
cout << "doc = \n" << doc_string << endl;
// Insert this document into the DB
// Allocate Statement Handle
OCIStmt* selecthp = 0;
checkerr(
OCIHandleAlloc(
(dvoid *) env.envhp, (dvoid **) &selecthp,
OCI_HTYPE_STMT, 0, 0
env.errhp
// Prepare Statement
const char *const sql = "INSERT INTO xml_tab (id, doc) VALUES (:1, :2)";
checkerr(
OCIStmtPrepare(
selecthp, env.errhp,
(const OraText*)sql, (ub4) strlen(sql),
(ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT
env.errhp
// Binds
ub4 id = 101;
OCIBind* bind_id = 0;
checkerr(
OCIBindByPos(
selecthp, &bind_id, env.errhp, 1, &id, sizeof(id), SQLT_UIN,
(dvoid *) 0, (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT
env.errhp
OCIBind* bind_doc = 0;
checkerr(
OCIBindByPos(
selecthp, &bind_doc, env.errhp, 2, 0, sizeof(point_typ), SQLT_NTY,
(dvoid *) 0, (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT
env.errhp
OCIType* xmltype_tdo = 0;
const oratext xmltype_name[] = "XMLTYPE";
checkerr(
OCITypeByName(
env.envhp, env.errhp, env.svchp,
0, 0, // schema name (default schema when 0)
xmltype_name, (ub4)strlen((const char*)xmltype_name),
0, 0, // version name (ignored)
OCI_DURATION_SESSION,
OCI_TYPEGET_ALL,
&xmltype_tdo // connection (service specific)
env.errhp
//xmldocnode* doc = 0;
ub4 doc_size = 0;
OCIInd doc_ind = OCI_IND_NOTNULL;
OCIInd* p_doc_ind = &doc_ind;
ub4 doc_ind_size = 0;//(ub4)sizeof(point_ind);
checkerr(
OCIBindObject(
bind_doc, env.errhp, xmltype_tdo,
//(void**)&p_pt, &pt_size, (void**)&p_pt_ind, &pt_ind_size
(void**)&doc, 0, (void**)&p_doc_ind, 0
env.errhp
// Execute (scalar) Select Statement
checkerr(
OCIStmtExecute(
env.svchp, selecthp, env.errhp, (ub4) 1, (ub4) 0,
(CONST OCISnapshot *) NULL, (OCISnapshot *) NULL,
OCI_DEFAULT
env.errhp,
OCI_NO_DATA // TODO: Test with a select that returns no rows,
// and specifying 0 iters, to see if it returns
// OCI_SUCCESS, or OCI_NO_DATA
// Commit transaction
checkerr(
OCITransCommit(env.svchp, env.errhp, 0),
env.errhp
XmlFreeDocument(xctx, doc);
OCIXmlDbFreeXmlCtx(xctx);
cout << "xml_dom_insert_main: " << timer << endl;
</tt>

Similar Messages

  • LATINOS ARE SCREWED with final cut pro x. Everytime I use tildes like  á  for example. FCPX freezes and restarts.... really is a bummer. And on a side note, Color Curves? 3 Wheel Color Wheels? XML support? Can´t wait for multicam. God Bless!

    With final cut pro x. Every time I use tildes like  á  for example. FCPX freezes and restarts.... really is a bummer. PLZ FIX. Here in Colombia I can not use FCPX for projects which involve names or text. (ALL PROJECTS)
    And on a side note, Color Curves? 3 Wheel Color Wheels (color board is great, but i didnt read a 400 page book on 3 wheel color correction for nothing) ? XML support? Can´t wait for multicam. God Bless!
    FCPX IS GREAT. It really is. Just a few features are required.....

    w andrewfromjupiter wrote:
    Tildes can be both
    I think the idea that an acute accent can also be called a "tilde" is total nonsense.
    http://en.wikipedia.org/wiki/Tilde
    http://en.wikipedia.org/wiki/Acute_accent
    But good idea to report the bug here:
    http://www.apple.com/feedback/finalcutpro.html

  • XML Parsing in Java Stored Proc--Oracle XML Support Installation?

    I am working with a third party product that is having difficulty running a java stored proc that is parsing a supplied XML file. The proc basically looks like:
    import java.io.IOException;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.FactoryConfigurationError;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.xml.sax.SAXException;
    InputStream is = getXMLAsInputStream(xml);
    try {
    DocumentBuilderFactory factory =
    DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse( is );
    ... parse the document ....
    catch (FactoryConfigurationError e) {
    // unable to get a document builder factory
    We are running on 9.2.0.6, HP-UX 64-bit. At first, when we would attempt to run the proc, a database hang would occur; now after attempting to install using loadjava jars for xerces2.6: ORA-29532: Java call terminated by uncaught Java exception:
    javax.xml.parsers.FactoryConfigurationError: Provider
    org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found)
    The vendor says that the errors we are getting when running are not due to any dependency on xerces or jre1.4, and that we need to "install Oracle XML support", but I'm not certain what this means (I cannot find any documentation on what to install). I believe that there are jars that need to be loaded into the database to support the XML parsing, as jre1.3 does not include built-in XML support, and Oracle 9.2.0.6 uses jre1.3.
    So...does anyone have any thoughts as to how to resolve the missing references? Is there a way to "install Oracle XML support", or is it to install the necessary jars?
    Thanks,
    Candi

    Candi,
    The following resources should be of help:
    Oracle9i Database Release 2 (9.2) Documentation Library
    In particular, check out the following:
    Java Developer's Guide
    Java Stored Procedures Developer's Guide
    XML API Reference - XDK and Oracle XML DB
    XML Database Developer's Guide - Oracle XML DB
    XML Developer's Kits Guide - XDK
    If that doesn't help, then try the following:
    OracleJVM and Java Stored Procedures
    XML Technology Center
    Good Luck,
    Avi.

  • XML support in SAP 4.6

    Hi all !
    I'm looking for information about XML support in SAP 4.6c.
    I have to implement a data exchange mechanism between SAP and web application written in Java. Whole idea looks simple: Java application send an XML document through RFC and ABAP program should parse this document. When document is parsed, program performs an action and receives single or multiple objects. Those objects have to be converted to XML and sent back to Java app.
    Is there any XML parser available in 4.6C. Is there any mechanism which serialize/deserialize ABAP Objects to/from XML.
    Thank you for any help and hints.
    Tomek

    Hi again !
    I need to convert an OBJECT INSTANCE. e.g.
    CLASS student DEFINITION.
    PUBLIC SECTION.
    METHODS:constructor
    IMPORTING
    i_name TYPE c
    i_indeks TYPE n,
    introduce_yourself
    EXPORTING
    e_name TYPE c.
    PRIVATE SECTION.
    DATA: name(30) TYPE c,
    indeks(10) TYPE n.
    ocena LIKE ys_ocena,
    tabela_ocen TYPE TABLE OF ys_ocena.
    ENDCLASS.
    I have to convert a single INSTANCE of this class to XML and send it as a XML stream (or XML formated content in internal table) in return value of function module called through RFC.
    As you can see - this class contains some variables and an internal table. For me, a best solution would be to provide this class instance as a parameter and get a XML formated data.
    I have a SAP system and Web Application written in Java. Comunications between them is provided by RFC (JCo). SAP application and Web Application communicate by exchanging a XML documents. Since, SAP part is using Abap Objects - i have to convert object to/from XML.
    Thanks for all your help.
    Tomek

  • XML support in AI

    Hi,
    I know there's XML support for InDesign but what abt AI? What I need to do is XML coding and tagging. Anyone?

    Look at the public API on the SDK - http://www.adobe.com/devnet/illustrator/sdk/
    In particular:
    AIArtSuite - Get/Set XMP metadata for an art object.
    AIDocumentSuite - Get/Set XMP metadata for a document object.
    AIAssetMgmtSuite - Simple XMP metadata manipulation.
    And AIXMPDataFieldMap - the structure used to update XMP metadata.

  • Simple XML DOM Example Needed.

    I need a simple XML DOM Example that reads in the XML and makes objects out of the elements. The tutorial from sun is very sketchy and seems to good far too quickly.
    Thanks,
    Dave.

    You can find some examples:
    http://java.sun.com/xml/jaxp/dist/1.0.1/examples/#building
    http://newinstance.com/writing/javaxml2/javaxml2_examples.html
    http://www.docuverse.com/domsdk/index.html#tutorial
    http://www.devx.com/sourcebank/search.asp

  • Servlets & XML-RPC Example

    Since I am not having any luck on the Java & XML forum (http://forum.java.sun.com/thread.jsp?forum=34&thread=512728&tstart=0&trange=15)
    I thought I would try here. Does anyone know of a good example on the web they can point me to that shows XML-RPC with servlets as I cannot find any and the examples dir from the Apache distribution of XML-RPC (which is supposed to have such an example) is MIA. Thanks.

    hello,
    I am looking for the same servlet xml-rpc example, Have you found it ?
    nojkan

  • Hello World XML/XSL example not working in IE

    I am trying to get the "Hello World" XML/XSL example to work in IE.
    Could anyone help me out?
    The code follows:
    hello.xml
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="hello.xsl"?>
    <hello-world>
    <greeter>An XSLT Programmer</greeter>
    <greeting>Hello, World!</greeting>
    </hello-world>
    hello.xsl
    <?xml version="1.0"?>
    <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0">
    <xsl:template match="/hello-world">
    <HTML>
    <HEAD>
    <TITLE></TITLE>
    </HEAD>
    <BODY>
    <H1><xsl:value-of select="greeting"/></H1>
    <xsl:apply-templates select="greeter"/>
    </BODY>
    </HTML>
    </xsl:template>
    <xsl:template match="greeter">
    <DIV>from
    <I><xsl:value-of select="."/></I>
    </DIV>
    </xsl:template>
    </xsl:stylesheet>
    Both files are in the same directory.
    When hello.xml is opened in IE, the output displayed is just, "from".
    What's wrong, and where?
    Please help!
    - Edwin.

    Hi edwinwaz,
    In response to your question, pls refer to this url
    http://www.w3schools.com/xsl/el_template.asp
    and take a look at the "note" in red.
    It says that IE5.X have non-standard behavior on the element <xsl:template>
    In addition, I have tested your code it works fine.
    Just to add something on your code here.
    I noticed that you do this
    <xsl:apply-templates select="greeter"/>
    and then in another template you do this
    <xsl:template match="greeter">
    <!-- code -->
    </xsl:template>
    In this case, it does work because "greeter" is a top-level element but if "greeter" is anything underneath the top-level element. It won't work.
    Actually, I discovered this after taking a look at your example and
    I was surprised that the code above worked and then I did some testing and discovered this.
    I am learning XML too now... So, I am happy to know this :).
    regards

  • Where can I find XML component examples ?

    where can I find XML components examples ?

    Here are a couple video tutorials using XML with Flash:
    http://www.gotoandlearn.com/play?id=64
    http://www.gotoandlearn.com/play?id=65
    Don't know if they're what you're looking for but worth a
    look.

  • Does xml support delta?

    does Xml support delta?

    What is it, an interview question? If so, it is a pretty bad one, in my view
    XML is used to push records to delta queue, however what goes in XML is entirely upto you.
    You can make an analogy between XML and flatfile; if you want you can put 'delta' data in a file and say it supports delta.

  • Does InDesign CC XML support Footnotes/Endnotes and Index Markers?

    Hi,
    Does InDesign CC XML support Footnotes/Endnotes and Index Markers already?
    Can anyone give me the list of limitations in XML to InDesign.
    Thanks in advance.

    Hello MW,
    First of all thanks for your reply. Yes I can create an XSLT to change the XML stream ready for import into InDesign template that we have. I have also downloaded the Refoot.js and UnFoot.js. For the footnotes I have already workaround for that, but how about the index-markers and cross-references do you have any idea on how to deal with it?
    Actually I have already XSLT script that will convert XML to InDesign Tagged Text. But our client want us to use the XML embedded in InDesign so they can just export the InDesign back to XML easily. I know that there are limitations in XML to InDesign, but we need to proved to them that using XML is not good to use in this workflow because of those limitations. So I'm looking for the list so I can send to them to tell them that what they want is not doable since there are a lot of things that XML in InDesign can't do.
    We have existing XML to InDesign round tripping workflow; 1) first we have the XSLT that will convert XML to InDesign Tagged text including footnotes, endnotes cros-refeneces and index-markers; 2) once the layout is final will export the InDesign document to HTML; 3) use XSLT script to convert exported HTML to XML. But it seems this workflow is not efficient to them. Can anyone suggest what other workflow for round tripping XML to InDesign.
    Again thank you very much for your quick reply.
    Regards,
    Elmer

  • XML Support On Linux

    Hi, Does anyone know what is the XML Support of Oracle8i on Linux? Can I use the same XSU packages i use on other systems?
    thanks

    It is usually more helpful to provide the Linux distribution version, rather than the kernel version, which you can find by typing:
    <pre>
    cat /etc/*release*
    lsb_release -d
    </pre>
    XML 1.0, HTTP 1.1 and Basic authentication are old web languages, protocols and standards. Support will depend on your browser or application you are planing to use. The others are software packages, java extensions, etc. which you can verify or install using yum, e.g.
    <pre>
    yum list \*axis*
    yum install axis
    </pre>
    or use "rpm" to see if a package is installed, e.g.
    <pre>
    rpm -qa \*xerces*
    </pre>

  • OCI XML mapping

    Hi,
    We are working on SRM 4.0 EBP 5.0 CCM 2.0 implementation project and are in process to design the system to read data from external catalog.
    The data is successfully read and mapped into OCI parameters if the data sent from external catalog is in HTML format. Now the problem is coming when the data is sent in XML format. I believe only by maintaining two parameters as 'xmltype' and 'xmlDocument' in the XML file coming back from web services (supplier's)the data can be mapped into OCI parameters. Can anyone please confirm this understanding. As before requesting suppliers for these changes I need to confirm from my end.
    Is there any way provided by SAP by which we can test the XML data punch outs.
    Thanking in advance.
    Rahul.

    Rahul,
    If you want to exchange catalog items with supplier web catalogs, they have to be OCI compliant, HTML or XML.
    And then, they should use the newest ESAPO version, i.e. ESAPO3.5.
    If this is not the case, you will have to map the XML file by yourself to get OCI structured data.
    Look at OCI 4.0 specifications (service.sap.com/srm --> mySAP SRM in detail --> SRM 4.0 --> Strategic Purch & sourcing --> Catalog Management --> PDF fiel Open Catalog Interface 4.0 ):
    The OCI can also process an XML file. Here the same architecture is used as in the pure HTML variant, this means the XML data is embedded in an HTML form for the transfer from the catalog to the SRM Server via the user’s browser.
    To transfer an XML file, besides the fields mentioned in section 3.3, two further HTML-input fields are used:
    • xmltype:
    This parameter specifies the type of the XML file used so that the correct XML mapping can be found. Up to and including SAP Enterprise Buyer 3.0 the mapping of the received XML data is done exclusively in the Business Connector which must be set up for this purpose for the relevant SAP Enterprise Buyer System.
    As of SAP Enterprise Buyer 3.5 the mapping can also be done in the SRM Server itself. A prerequisite is that the corresponding XML schema is used. The previous schemas are also supported.
    Valid values for the field type xmlType as of SRM 3.0 are:
    Value
    Description
    DTD/Schema/Mapping
    ESAPO
    Encoded SAP Object for OCI Version up to and including3.0
    PDI_OCI.dtd/PDI_OCI.xsd/BC
    ESAPO3.0
    Encoded SAP Object for OCI Version up to and including 3.0
    PDI_OCI_30.dtd/PDI_OCI_30.xsd/BC
    ESAPO3.5
    Encoded SAP Object for OCI Version as of 3.5
    OpenCatalogInterface.xsd/im SRM Server.
    • ~xmlDocument:
    In this parameter the XML file that must correspond to one of the schemas above is transferred as a Base64-coded character set. The coding can be done either directly on the server page of the catalog or, as shown in the sample application, by JavaScript on the client’s page.
    Rgds
    Christophe

  • Where is the XML support in iPhone

    The only example I've been able to find for the iPhone SDK that demonstrates how to use XML content is the SeismicXML application. It appears to use libXML2. Is this the only approach?
    Is it not possible to us NSXml which is so much more intuitive to use. Will NSXml support be added in the final release of the SDK?

    Can't seem to find that change list.
    Can you please fill us in on what we can do to use NSXML with iPhone (if anything).
    So annoyed that this works on the simulator and not the device.
    Blasted Apple!

  • Indesign XML support frustration, my worst customer experience ever

    Hi,
    I have opened a paid for incident with Adobe, case #  182 433 774 , and am completely frustrated. I have spent 3 hours on the phone talking to people that have NO grasp on the english language, and no technical expertise. They say they don't know XML, but can help me. Days have gone by, and they claim that my problem has been escallated, yet they don't even have the details of the problem. This is clearly the worst tech support that I have ever encountered, even though we are talking about a $2,000 product. Isn't there any better tech support that I can buy?
    Does anyone know what support options I have to resolve and XML issue?  We are only able to render the first page of our XML driven catalog, then the job seems to complete without any complaint. We are using Indesign 5.0.

    Well, you could ask your question here! I hate XML but I can probably help you.

Maybe you are looking for

  • 1 account 3 devices game center question

    Hi i have 3 devices 1ipad and 2 iphones, i want to sync all this devices so i use 1 the Same account (nothing wrong With this) but i can not use game center now to play games to each other because the same account... Can Some one help me please i Wil

  • Passing pl/sql table to Java using Oracle JDBC and vice - versa

    A small article on the given topic with sample code and comments, to make code crystal: http://mukx.blogspot.com/2007/12/passing-plsql-table-to-java-using.html --Mukul                                                                                   

  • How can I compact a MSAccess database with java?

    Hi. I have a question (Please Help!!!): How can I compact a MSAccess database with java-jdbc? Is it posible? Thanks

  • Quick Form Question

    I've been looking through the forums on how to do something with forms, and all people are talking about are dynamic form generation. I have built an "update" form without the use of the wizard. I pass it an id number via the hyperlink and when based

  • Can't put albums on album page.

    I have used iWeb for over 5 years and never had this problem. I have an album page on my website and it won't let me pull new albums onto my album page. What Gives? Message was edited by: Glasshead420