BDB XML 2.4 : Xquery from file

Hi
I am using BDB XML 2.4 (on Fedora Linux - C++) . Is it possible to run Xquery from xquery file (instead of placing the query string in a string variable)? If so please let me know what API i have to use?
Thanks,
Santhosh

Hi Santhosh,
DB XML doesn't provide API to do that directly. You'll have to write a small wrapper function that reads the file into a string and passes that to DB XML.
John

Similar Messages

  • WCF Service and Sharepoint Form library : How i can read a access a form libray and query a item from file name and read form xml in WCF service ?

    WCF Service and Sharepoint Form library : How i can read or access a form libray and query a item from file name and read form xml in WCF service ?
    Ahsan Ranjha

    Hi,
    In SharePoint 2013, we can take use of REST API or Client Object Model to access the SharePoint objects like Form Library.
    SharePoint 2013 REST API
    http://msdn.microsoft.com/en-us/library/office/dn450841(v=office.15).aspx
    http://blogs.technet.com/b/fromthefield/archive/2013/09/05/working-with-sharepoint-list-data-odata-rest-and-javascript.aspx
    SharePoint 2013 Client Object Model
    http://msdn.microsoft.com/en-us/library/office/fp179912(v=office.15).aspx
    http://msdn.microsoft.com/en-us/library/office/jj193041(v=office.15).aspx
    With the retrieved file, we can then use XmlDocument object to parse it and get the values you want:
    http://weblogs.asp.net/jimjackson/opening-and-reading-an-xml-file-in-a-document-library
    http://stackoverflow.com/questions/1968809/programatically-edit-infopath-form-fields
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to output full-text document from BDB-XML

    I put a XML document(test.xml) into BDB-XML; Edit and modify use BDB-XML API.
    After, if I want to output(roll out) my XML document(test.xml) which was storage in BDB-XML.
    Are there any support in BDB-XML API or Shell to output full-text document from DB??
    Thank you very much :)

    In the shell:
    dbxml> getDocument "document name"
    dbxml> print ["output_file_name"]
    In a (Java) program:
    XmlDocument doc = container.getDocument("document name");
    String output = doc.getContentAsString();
    Regards,
    George

  • Js load xml element - style match from another file

    Hi all
    I got a ID file with a placed xml file, all styles are prepaired.
    Now I would like to load the xml element <-> style match from a given template file, where I prepaired all the matches.
    I would imagine this is a bit like loading the styles or the swatches from another file, but have not found any code samples yet.
    Can anybody help?
    Thanks
    Romano

    js for Structure; XML; Map Tags to Styles...
    I don't think that is what I am looking for and I feel I must asked this question in an unclear way...
    so I started a new discussen with the above heading.
    Thank you anyway.
    Romano

  • Submitting xml publisher not producing output file when submiting from Oracle Procedure

    When Running XML publisher program from Oracle Procedure, Program not generating output file, but same XML publisher program running from Concurrent program runs and produces the output file.
    Here is the code
    CREATE OR REPLACE PROCEDURE apps.wmmgd_sepa_formats (
       p_return_msg      OUT      VARCHAR2,
       p_return_code     OUT      NUMBER,
       p_payment_batch   IN       VARCHAR2                                    ---,
    --- p_bank_name          in varchar2
    IS
       name:      wmmgd_sepa_formats
       purpose: this procedureis to  create SEPA payment formats
       revisions:
       ver      date        author           description
       1.0     6/11/2013  V Gongireddy  Created the Procedure
       l_ret         BOOLEAN;
       l_req_id      NUMBER;
       v_org_id      NUMBER;
       v_cntr        NUMBER;
       v_file_name   fnd_concurrent_requests.outfile_name%TYPE;
       v_language    VARCHAR2 (20);
    BEGIN
       SELECT fnd_profile.VALUE ('ORG_ID')
         INTO v_org_id
         FROM DUAL;
       fnd_file.put_line (fnd_file.LOG, 'org id ' || v_org_id);
       fnd_file.put_line (fnd_file.output, 'Start org id ' || v_org_id);
       FOR i IN 1 .. 10000
       LOOP
          v_cntr := v_cntr + 1;
       END LOOP;
       l_ret :=
          fnd_request.add_layout ('SQLAP',
                                  ' WMMGDSEPAFORMATXSL',
                                  'en',
                                  'US',
                                  'XML'
       IF l_ret = TRUE
       THEN
          BEGIN
             fnd_file.put_line (fnd_file.output,
                                'Payment batch ' || p_payment_batch
             l_req_id :=
                fnd_request.submit_request ('SQLAP',
                                            'WMMGDSEPAFORMAT',
                                            FALSE,
                                            p_payment_batch
             v_cntr := 0;
             FOR i IN 1 .. 10000
             LOOP
                v_cntr := v_cntr + 1;
             END LOOP;
             p_return_msg := 'Request submitted. ID = ' || l_req_id;
             p_return_code := 0;
             COMMIT;
          EXCEPTION
             WHEN OTHERS
             THEN
                p_return_msg :=
                      'Payment Request set submission failed - unknown error: '
                   || SQLERRM;
                p_return_code := 2;
                fnd_file.put_line (fnd_file.LOG,
                                   'the_request_id ' || l_req_id || p_return_msg
          END;
       END IF;
    END wmmgd_sepa_formats;
    Thanks in advance

    And metalink note 1100253.1 states that this issue (java.lang.StackOverflowError) might be caused by a too large set of data to be sorted in the layout file. Recommendation is to removed the sort from the layout file and instead sort the data already in the data definition.
    regards,
    David.

  • Write from file XML to file .txt ???

    file xml :
    <Dictionary>
    <record>
    <word>Techer</word>
    <meaning>Giao Vien</meaning>
    </record>
    <record>
    <word>Student</word>
    <meaning>Sinh Vien</meaning>
    </record>
    </Dictionary>
    I want write file.txt with format:
    Teacher GiaoVien Student Sinh Vien ......
    Help Me ...Thanks

    Sorry, i don't mean that..
    as i say, as3 read the data from file sorting like that:
    1,john,ny
    2,jessy,cal
    3,smith,nj
    how can i pass those values to the textboxes . id , name , address
    so i can go next and previous
    thank you again..

  • How to loop through xml records from file without ROW , /ROW tags?

    I am using dbms_XMLSave.insertXML procedure to insert xml formated record from file. MY xmlformated records does not have open and close ROW tags. I have multiple records in the file.How can I loop through without <ROW>,</ROW> tags?

    I am using dbms_XMLSave.insertXML procedure to insert xml formated record from file. MY xmlformated records does not have open and close ROW tags. I have multiple records in the file.How can I loop through without <ROW>,</ROW> tags?

  • Dummy XML not getting generated from empty file by J2EE adapter module

    Hi All,
    i know when XI gets an empty input text file, it does not generate a send message for it in sender communication channel.
    in my scenario, if i get a file with data, i have to generate an XML message for it using file content conversion - this i have done...........
    but if i get an empty text file, then i have to generate a dummy XML send message for it for my BPM.......
    So i made a J2EE adapter module to generate dummy xml for empty file.....<b>when i give a file with data in it, then my adapter module is called..... but when i give an empty file, then my adapter module is not called</b>.........
    <b><i>Can anybody suggest why the module processor is not invoking my customer-adapter module when an empty file is given.............but the module processor is invoking my customer-adapter module when a file with data is given</i>.</b>
    Thanks,
    Rajeev Gupta

    Hi Amit,
    Below is the code of process method which i used:
    <i>public ModuleData process(ModuleContext moduleContext,
      ModuleData inputModuleData)
        throws ModuleException
    Object obj;
    Message msg_audit;
    AuditMessageKey amk;
    try
    File f = new File("/components/XITEMP/sample/PWC/check.txt");
    PrintStream ps;
    if (f.canWrite())
    FileOutputStream fos =new FileOutputStream(f);
    ps = new PrintStream(fos);  
    ps.println("Testing");
    ps.close();
    fos.close(); 
    else
      f = new File("/components/XITEMP/sample/PWC/check4.txt");
      if (f.exists() ==false)
      f.createNewFile();
    obj = inputModuleData.getPrincipalData();
    if (obj!=null)
    msg_audit = (Message)obj;
    amk = new AuditMessageKey(msg_audit.getMessageId(),AuditDirection.OUTBOUND);
    Audit.addAuditLogEntry(amk,AuditLogStatus.SUCCESS,"FileCheck: Module called");
    else
      String str = new String();
    String str1 = new String();     
                  str1="<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
                 str1+="<ns:MT_PWC_RECORD xmlns:ns=\"urn://PWC_SR3_01/PWC/Customer\">";
             str1+="<RECORD_SET>";     
                 str1+="<RECORD>";
             str1+="<RECORD_DATA>BLANK_FILE</RECORD_DATA>";
             str1+="</RECORD>";
             str1+="</RECORD_SET>";
             str1+="</ns:MT_PWC_RECORD>";     
    str=str1; 
    inputModuleData.setPrincipalData(str);
    catch(Exception e)
    try
    File f = new File("/components/XITEMP/sample/PWC/check.txt");
    PrintStream ps;
    if (f.canWrite())
      FileOutputStream fos =new FileOutputStream(f);
      ps = new PrintStream(fos);  
      ps.println(e.toString());
      ps.close();
      fos.close(); 
    catch(Exception ex)
    return inputModuleData;
       }</i>
    in the above methood, i  used file operations at start just to see whether the module is getting invoked or not...so when i give a data file, then the file operations are performed and messages are written in audit log.........but when i give an empty file, then the file operations are not performed - meaning the module is not getting invoked........
    Thanks,
    Rajeev Gupta

  • Installing BDB XML and including it into a java application

    Hi there :)
    I'm new to BDB XML and I've got some questions about it :
    1/ The documentation says about BDB XML that it is based on BDB. Does it mean that I need to install the standard BDB first to use BDB XML ? (I'm pretty sure I don't have to but I would like a confirmation =))
    2/ I want to developp a web application which will use BDB XML. The documentation says I need to add some jars into my project to use it but do I need to install it on my computer (Windows XP) first ? (with the .msi file ?)
    3/ Where will the xml files be physically stored after I add them into the database ? (what is the default database folder on the hard disk ?)
    Thank you for you help :)
    Regards,
    Gary

    Hi Gary,
    1) You need to install only DB XML. BDB is bundled with DB XML, so you don't have to worry.
    2) Yes, you need to add two jars: db.jar and dbxml.jar. But these jars depend on native DB XML libraries, so you will have to install DB XML anyway: only jars wouldn't be sufficient. Moreover, I would recommend to install DB XML from sources providing the --enable-java+ flag to the buildall.sh script
    3) All XML files will be stored in a container or containers (depending on how many of those you will decide to utilize in your application). It is up to you where you are going to reside DB XML environment/containers -- DB XML is quite low-level XML-database.
    Hope this helps,
    Vyacheslav

  • Some doubt about Bdb XML Normal Recovery

    Hi, everyone
    I have read the document Getting Started with Transaction Processing for Java shipped with Bdb XML 2.4.13. In the book, there is something about Normal Recovery:
    Normal recovery is run only against those log files created since the time of your last checkpoint.To test this, I have designed a scenario as below:
    The ENVIRONMENT directory is under E:/bdb-xml/environment, and the BACKUP directory is under E:/bdb-xml/backup, the CONTAINER name is entry.dbxml, and there is already a document 1.xml in this container.
    1. run db_recover against ENVIRONMENT.
    2. copy entry.dbxml to BACKUP.
    3. create a document 2.xml.
    4. run checkpoint against ENVIRONMENT.
    5. modify document 1.xml.
    6. run checkpoint against ENVIRONMENT.
    7. copy log.0000000001(there is only one log file in ENVIRONMENT) to BACKUP, Note that I didn't copy the entry.dbxml in ENVIRONMENT.
    8. run db_recover agaist BACKUP(now there are 2 files : entry.dbxml, log.log.0000000001).After that, I used the BACKUP as environment directory, and try to query 2.xml. And I retrieved the document correctly, which I feel very curious. As the document says, the last checkpoint is created by step 6, after that, there is no other modifications happens, so the modification happened at step 3 and step 5 will not take effect when db_recover executed. But the two changes have committed to entry.dbxml.
    So, which is the last checkpoint. And what is the those log files created since the time of your last checkpoint.
    I also want to know where the checkpoint be writen, in the db files or the log files.
    thanks advance.
    Regards,
    John Kao.

    Jhon,
    You really do want to know the gory details don't you? :-)
    Running recovery in your backup directory will cause the container there to pick up all changes from the log file that it does not yet have. The checkpoint on the original container doesn't mean anything to the backup container.
    Let me point you to even more interesting documentation that is in the Berkeley DB documentation set. This page has all of the BDB documentation, including links that are not included in the BDB XML doc:
    http://www.oracle.com/technology/documentation/berkeley-db/db/index.html
    The "Getting Started with Transaction Processing" documents on that page have the sort of information you seem to want.
    Regards,
    George

  • Correct installation of BDB XML on Mac OS X, and use with XCode

    I downloaded the tarball, compiled the whole thing without a problem, and then copied the contents of the install directory to /usr/ (trying to change the prefix on the configure script stopped it from compiling, for some reason) because I didn't want to add stuff to my path (and the contents looked like they belonged in /usr anyway)
    But now I'm not sure how to get XCode to find the search paths and libraries. Does anyone who has a working installation of BDB XML on mac os feel like giving me some pointers as to how they did it?
    Thanks,
    Daniel Peebles

    I don't know the exact answer to your question, but you can probably figure it out on your own like:
    1) Create a File object that represents an existing file. Play around with the path until the file can be found.
    2) Now that you have a File object representing a valid, existing path, use MyFile.getAbsolutePath() to see what the full path string is. MyFile.getCanonicalPath() might provide some answers as well.
    Whatever getAbsolutePath() returns is the correct format for the file path string.

  • Multimedia Information on BDB XML

    Hello,
    I was searching on google for some databases that support multimedia information, as the project I'm working on will need it. Most DBMSes provide a BLOB field where you can store any kind of MM information on it.
    Some folks advised me to use the filesystem itself and avoid the DB for this kind of storage. But I wonder, how can you assure integrity, if the information on the fs can be moved, erased, changed in so many ways, and the DB would be unaware of this. I dont think this is a good solution.
    So, does BDB XML provide support for MM information?
    thanks,
    -- Breno Jacinto

    Breno,
    Storing binary information in BDB XML metadata or in Berkeley DB records would maintain the integrity of the data, and ensure that it's as safe as the rest of your data. It also makes backup/restore of the complete system simpler. The arguments against doing this include:
    o storing/retrieving binary data happens through the cache, so your cache ends up abused by the binary information, possibly flushing valuable information such as indexes and frequently-accessed content. This has performance implications, and can result in more disk activity when querying your containers than would normally occur.
    o without special streaming support, it's hard to stream binary data reliably from the database (not a problem if your data is relatively small)
    As for storing binary info in the file system and linking it (via names) to your XML, it's not hard to provide as much protection for that data as you do for your database. The database files are just files in the file system themselves, and subject to the same attacks as normal files.
    If you protect your binary files with the same level of protection as your database files, they are safe. The major down sides of separate storage are:
    o you don't have transactions on the file system, so you need to program in a way to ensure that your database and binary data are in sync.
    o backup and restore are more complicated (mentioned above)
    Better support for large binary objects is on the list for a future release of Berkeley DB, and that support will address the issues; however, that's not an option today.
    I hope this helps,
    George

  • Miscellanous questions about BDB XML

    Hi !
    I'm in search for a storage solution for a Matlab app that manipulates big volumes of datas (several Gb), and so can't load them fully in memory without crashing. I also can't load / unload them each time I need a bit of these data, since it is rather long to load a file in memory (about 0.12s). So I was thinking about using a DMB like BDB XML, and I have a few questions about it :
    <ul><li>What about performances to create a 3-5Gb database in a single batch ?</li>
    <li>What about performances to excecute a XQuery request on a db this large ? Longer or shorter than loadin directly the file in memory ? With an index or without ?
    </li>
    <li> No matlab integration is provided, so I have to way : use Matlab C integration to make an interface to use BDB XML, or using the shell via an exec like command to interact with BDB ? Is the shell trick performant ? Or does it spend a lot of time parsing the input ?</li>
    </ul>
    Thanks for those who will take a bit of their precious time to answer my questions !

    Hello,
    I'm in search for a storage solution for a Matlab app that manipulates big volumes of datas (several Gb), and so can't load them fully in memory without crashing. I also can't load / unload them each time I need a bit of these data, since it is rather long to load a file in memory (about 0.12s). So I was thinking about using a DMB like BDB XML, and I have a few questions about it :
    <ul><li>What about performances to create a 3-5Gb database in a single batch ?</li>It will take a while. If you bulk load you should avoid using transactions and sync/exit the environment when you are done. Note that you should determine what indexes you might want/need before doing the load and create them. Reindexing 5GB of data will take another really large chunk of time. I recommend experimentation with indexes, queries and a small representative subset of the data.
    Be sure to create a node storage container with nodes indexed.
    Is this one document or many? Many is better. One 5Gb document is less than ideal but will work.
    <li>What about performances to excecute a XQuery request on a db this large ? Longer or shorter than loadin directly the file in memory ? With an index or without ?You really need indexes. The query will likely succeed without indexes but depending on the query and the data could take a very long time. See above on experimentation first.
    </li>
    <li> No matlab integration is provided, so I have to way : use Matlab C integration to make an interface to use BDB XML, or using the shell via an exec like command to interact with BDB ? Is the shell trick performant ? Or does it spend a lot of time parsing the input ?</li>There is no C interface, just C++. I would not recommend using the dbxml shell for this although you could if you really need to.
    Let the group know how this turns out.
    Regards,
    George

  • Error reading from file glibc-2.5-24.i686.rpm RHEL 5 Setup stuck at 80%

    Hi, I am installing Oracle 10g on RHEL 5 (Red Hat Enterprise Linux 5) machine I am facing two problems
    1) while installing the rpm packages the following package gave an error
    Error reading from file glibc-2.5-24.i686.rpm
    2) I still gave a try to runInstaller command the installer opened but was stuck at 80%
    I have 3 GB ram and 320GB hard drive I am not sure what to put in the swap memory and other settings i blindly followed instructions given here
    http://www.oracle-base.com/articles/10g/OracleDB10gR2InstallationOnRHEL5.php
    What could be the problem where do I find the error log if its created
    Please help me
    Thanks
    Edited by: 891355 on Nov 6, 2011 12:06 PM

    I found the installActions file in the installer folder and I think this could be the problem
    INFO: The 'shiphomeproperties.xml' file is missing from shiphome location '/home/oracle/Desktop/database/install/../stage/products.xml.' Add this file to the 'Disk1/stage' directory of the shiphome.
    though I am attaching the log file for more details do you think the installer is corrupt :(
    InstallActions log file ==> http://www.mediafire.com/?nh7mx7bxqht9ovu
    Edited by: 891355 on Nov 6, 2011 1:35 PM

  • Cannot deploy process flow package specification from file

    Hi,
    we are using owb 11gr2 on linux. We successfully managed to deploy mappings and tables into a specification file, and then deploy from that file into the target database (RAC). But when we try to deploy a process flow package we run into an error:
    A process flow package can be deployed to a specification file. But a deployment from that specification file fails with the error: " OMB05623: Cannot deploy specification from file. Exception follows. nulll"
    ### SETUP
    set CONN_DESIGN "xxx"
    set CONN_TARGET_DESIGN "yyy"
    set CONN_TARGET_RT "xxx'"
    set DIR "D:\\tmp"
    set RELEASE "V0_2"
    set file "$DIR\\$RELEASE"
    set plan "FILE_DEPLOY_$RELEASE"
    ### Deployment via control center: works!
    OMBCONNECT $CONN_DESIGN
    OMBCONNECT CONTROL_CENTER $CONN_TARGET_RT
    OMBCC '/KLINGEL_DWH'
    OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN '$plan'
    OMBALTER DEPLOYMENT_ACTION_PLAN '$plan' ADD ACTION 'PF_TEST' SET PROPERTIES (OPERATION) VALUES ('REPLACE') SET REFERENCE PROCESS_FLOW_PACKAGE '/KLINGEL_DWH/WF_DWH/PF_TEST'
    OMBDEPLOY DEPLOYMENT_ACTION_PLAN '$plan'
    OMBDISCONNECT CONTROL_CENTER
    OMBCOMMIT
    OMBDISCONNECT
    ### Deployment via specificatin file: fails!
    OMBCONNECT $CONN_DESIGN
    OMBCONNECT CONTROL_CENTER $CONN_DESIGN
    OMBCC '/KLINGEL_DWH'
    OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN '$plan'
    OMBALTER DEPLOYMENT_ACTION_PLAN '$plan' ADD ACTION 'PF_TEST' SET PROPERTIES (OPERATION) VALUES ('REPLACE') SET REFERENCE PROCESS_FLOW_PACKAGE '/KLINGEL_DWH/WF_DWH/PF_TEST'
    OMBDEPLOY DEPLOYMENT_ACTION_PLAN '$plan' AS SPECIFICATION TO '$file.xml'
    OMBDROP DEPLOYMENT_ACTION_PLAN '$plan'
    OMBDISCONNECT CONTROL_CENTER
    OMBCOMMIT
    OMBDISCONNECT
    OMBCONNECT CONTROL_CENTER $CONN_TARGET_RT
    OMBDEPLOY SPECIFICATION FROM '$file.xml'
    ### OMB05623: Deployment von Spezifikation aus Datei nicht möglich. Exception folgt. null
    ###OMB05623: Cannot deploy specification from file. Exception follows. nullIf we use the operation DROP it works. But REPLACE and CREATE do not work.
    We get the error regardless whether the code is executed as an expert or on the command line at a windows client.
    Does anyone knows a workaround?
    Deployment via a specification file is a must due to license and architecture requirements.
    Thanks,
    Carsten.

    Its woked fine for me for OWB 10.2.0.4 .... some steps are missing from code like
    when you are connecting again it should be
    OMBDISCONNECT
    OMBCONNECT CONTROL_CENTER $CONN_TARGET_RT
    OMBDISCONNECT
    OMBCC '/KLINGEL_DWH'
    OMBCONNECT CONTROL_CENTER $CONN_TARGET_RTI think you can try the same on different system .
    Cheers
    Nawneet

Maybe you are looking for

  • What are the possible reasons for a procedure to go into uncompiled state?

    hi, we are working on a warehousing project where in we have a set of procedures that run every day to fetch the data from the source and populate it into the target. For the past few days some of these procedures are going into un-compiled state eve

  • Can I use a standard Portal page as Single Sign-On page?

    Hi all IHAC that would like to be able to maintain the login page. I have told them that it might be difficult as the login page is a jsp file and not a standard portal page. So now I'm wondering if it would be possible to create a standard portal pa

  • XIAPPLUSER gets blocked in BI when processing messages

    Hi, We have an integrated scenario between XI and BI. When processing messages between XI and BI the XIAPPLUSER gets random blocked. Somethimes after 4000 messages somethimes after 500 messages. We did not used this user by some other system or defin

  • New iMac Keeps Crashing

    So this is my second breand new iMac that I ordered direct from the apple Website - I got it about 5 days ago.  They had me return the first one because it kept crashing.  Now this one does too... Here is the crash report.  It has crashed 3 times tod

  • Tomcat 6 Admin Webapp Headache

    Hi there, I've just installed Tomcat 6 and am now trying to install the Admin webapp. Firstly, I couldn't find it anywhere on the tomcat website and I eventually (after loads of searching around on google) found the following: http://www.apache.org/d