XDK - DTD Generation using OracleXMLQuery

I have been using (and enjoying) the XDK for the last month. However, I have a problem - I want to generate a DTD for a given RBD table without any associated XML. To date, I have not been able to accomplish this task. I provided a simple example below. When I print the XML using 'qry.getXMLString(true)' the DTD is intact. But, when I generate a DOM from the query and then extract the documentType it contains nulls - In fact, the DTD name is null.
// Don't care about data, just the DTD
ResultSet rset = stmt.executeQuery("select * from mytable");
OracleXMLQuery qry = new OracleXMLQuery(conn,rset);
qry.setMaxRows(1);
// OK - prints internal DTD and XML
System.out.println(qry.getXMLString(true));
// Get the DOM
Document doc = qry.getXMLDOM(true);
DocumentType dt = doc.getDoctype();
// PROBLEM - Returns null
System.out.println(dt.getName());
Thanks for the help.
Joe

The DTD class generator supports DOCTYPE. The generate() method "Traverses the DTD with element doctype as root and generates Java classes."
http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96616/arxml07.htm#1005265

Similar Messages

  • Problem for xml generation using DBMS_XMLGEN

    Hi All,
    i have problem during xml generation using Any help would be highly appreciate
    how could we publish xml data using data base API DBMS_XMLGEN in oracle applications (APPS) i.e. at 'View Output" using
    Any help would be highly appreciate.
    Let me know if need more explanation, this is High priority for me.
    Thanks and Regards,
    [email protected]
    Message was edited by:
    user553699

    You can set the null attribute to true , so that the tag appears in your XML
    see the statement in Bold.
    DECLARE
    queryCtx dbms_xmlquery.ctxType;
    result CLOB;
    BEGIN
    -- set up the query context
    queryCtx := dbms_xmlquery.newContext(
    'SELECT empno "EMP_NO"
    , ename "NAME"
    , deptno "DEPT_NO"
    , comm "COMM"
    FROM scott.emp
    WHERE deptno = :DEPTNO'
    dbms_xmlquery.setRowTag(
    queryCtx
    , 'EMP'
    dbms_xmlquery.setRowSetTag(
    queryCtx
    , 'EMPSET'
    DBMS_XMLQUERY.useNullAttributeIndicator(queryCtx,true);
    dbms_xmlquery.setBindValue(
    queryCtx
    , 'DEPTNO'
    , 30
    result := dbms_xmlquery.getXml(queryCtx);
    insert into clobtable values(result);commit;
    dbms_xmlquery.closeContext(queryCtx);
    END;
    select * from clobtable
    <?xml version = '1.0'?>
    <EMPSET>
    <EMP num="1">
    <EMP_NO>7499</EMP_NO>
    <NAME>ALLEN</NAME>
    <DEPT_NO>30</DEPT_NO>
    <COMM>300</COMM>
    </EMP>
    <EMP num="2">
    <EMP_NO>7521</EMP_NO>
    <NAME>WARD</NAME>
    <DEPT_NO>30</DEPT_NO>
    <COMM>500</COMM>
    </EMP>
    <EMP num="3">
    <EMP_NO>7654</EMP_NO>
    <NAME>MARTIN</NAME>
    <DEPT_NO>30</DEPT_NO>
    <COMM>1400</COMM>
    </EMP>
    <EMP num="4">
    <EMP_NO>7698</EMP_NO>
    <NAME>BLAKE</NAME>
    <DEPT_NO>30</DEPT_NO>
    <COMM NULL="YES"/>
    </EMP>
    <EMP num="5">
    <EMP_NO>7844</EMP_NO>
    <NAME>TURNER</NAME>
    <DEPT_NO>30</DEPT_NO>
    <COMM>0</COMM>
    </EMP>
    <EMP num="6">
    <EMP_NO>7900</EMP_NO>
    <NAME>JAMES</NAME>
    <DEPT_NO>30</DEPT_NO>
    <COMM NULL="YES"/>
    </EMP>
    </EMPSET>
    http://sqltech.cl/doc/oracle9i/appdev.901/a89852/d_xmlque.htm

  • SAP RF/ Bar code generation using IM

    Hi folks
    Can any one experiencing in using SAP Console / Bar code generation using Inventory Management .

    Please read this article
    http://tdworld.com/info_systems/highlights/peak-pepco-inventory-management/
    Is it possible to generate the barcoding using Handling unit or any other module without WMS ?
    Thanks for your input
    Jeevan

  • Visual C++ AM/FM generation using NI-6062E & DAQmx C functions

    hi all,
    I am trying to write my own code in VC++ .Net(MFC) for FM/AM generation using DAQmx C functions, but it was more demanding than on the LabView platform. I can build the framework for all parameters (ie. Carrier Freq, Modulation Freq, Modulation Index, Amplitude) but as I came to the the array size, sampling rate, buffer size, I don't know what to do??
    Can anyone please have a look?
    Thank you very much!
    Attachments:
    NI_AM_FM.zip ‏60 KB

    Hello Sean,
    The following code is where I think most important to my task of AM/FM generation:
    (Ln147 to Ln162 in FunctionGenerator.cpp)
    void CFunctionGenerator::GenerateSineWave(
    CNiReal64Vector& waveform,
    double frequency,
    double amplitude,
    double sampleClockRate, // samples/sec.
    double samplesPerBuffer)
    double deltaT = 1/sampleClockRate; // sec./samp
    int intSamplesPerBuffer = static_cast(samplesPerBuffer);
    waveform.SetSize(intSamplesPerBuffer,CNiVector::NiVectorDoNotInit);
    for(int i=0;i waveform[i] = amplitude * ::sin( (2.0 * M_PI) * frequency * (i*deltaT) );
    I want to change the waveform 1D array to something like this for FM:
    waveform[i] = amplitude * ::cos(((2.0 * M_PI)*carrier_frequency*(i*deltaT)) + modulation_index*sin((2.0 * M_PI) * modulator_frequency * (i*deltaT)));
    for AM:
    waveform[i] = amplitude * (1 + modulation_index * cos (( 2.0 * M_PI) * modulator_frequency *(i*deltaT))*cos((2.0 * M_PI)* carrier_frequency *(i*deltaT)));
    It seems I need to add two more parameters "double frequency_modulator, double modulation_index," to the GenerateSineWave function,
    but it also looks like I need to adjust the "for(int i=0; i < intSamplesPerBuffer; i++)" because from my LabView Block Diagram iteration of "i" also depends on the two frequency parameters?
    Do I also need to adjust deltaT? or the sampleClockRate is not fixed in FM/AM cases?
    How can I do the above?
    Thank you for your patient.
    Regards,
    RollyMessage Edited by Rolly on 04-06-2005 02:35 PM
    Message Edited by Rolly on 04-06-2005 02:38 PM

  • What is the best user guide for my ipod touch 2nd generation using ios 4.2.1?

    I have a second hand ipod touch 2nd generation using ios 4.2.1, this is my first mobile apple device and I want to read up on it this weekend but the guides seem to be for devices running ios3 on 2nd gen or 4.3 on 3rd+ gen, none for 2nd gen with ios4.    is there one i haven't found or should I read the ios3 guide then the ios 4.3 guide?

    And here is a video that someone else did walking through some of the features on a 2nd gen:
    http://www.youtube.com/watch?v=sr1jYOMyQhU

  • Is there any way to change waveform generation using formula with user defined formulas

    Hi,
    I need to build a VI that has in input a formula (Exen(w*t)) and output a waveform.
    The waveform generation using formula.Vi that comes with labview has Defined formulas and theu are not dinamic I don't want that.
    I try to change with a text control but VI dont generate the graph.
    Can someone help me with this please?
    Best regards
    Ricardo
    Attachments:
    test.vi ‏18 KB

    Hello.
    If you want to change your formula with a textbow, you can use the Eval Formula Node.vi if you have a full version of LabVIEW.
    see http://digital.ni.com/public.nsf/allkb/C5DBAA3A788​271EE86256B02007DD6B3?OpenDocument
    Best regards

  • I am trying to configure some new unsupervised iPod touch 4th generation using Apple Configurator but it won't give me the option to install the app that appears on the Apps tab.

    I am trying to configure some new unsupervised iPod touch 4th generation using Apple Configurator but it won't give me the option to install the app that appears on the Apps tab. I have tested the to see whether it works in supervised mode and it does but in Prepare mode it won't let me tick the box.
    Any ideas anyone?
    Many thanks
    Mario.

    The requirments say:
    Requirements: Compatible with iPhone 3GS, iPhone 4, iPhone 4S, iPad 2 Wi-Fi + 3G, and iPad Wi-Fi + 4G.Requires iOS 5.0 or later.
    No mention of iPod touch
    http://itunes.apple.com/app/jack-boxer/id530122469?mt=8

  • HT204409 Can't determine my location with my iPad 3rd generation using Wi-Fi??

    Hi there,
    Can't determine my location with my iPad 3rd generation using Wi-Fi??
    I did all the common troubleshoots as reboot the device, check if it works with other devices (checked with iPad 4th generation works fine)...elc.
    Please Advice.

    Wifi-only iPads do not do a good job of finding location. Their location depends on the location of the wifi router they are connected to being registered in an online database. If you wnat better location results you need an iPad with GPS (iPad wifi +3G) model.

  • Help needed for report generation using java technologies

    May i get some idea about report generation api available. some report generation tools that can be downloadble. can you please suggest how to use scheduling the printers or report generation by scheduling.

    e.g. for one of my school project which generate reconciliation report (banking project) we add in a letterheader and the rest of the information presented below.
    but there is some problem here.
    either you "catch" no. x row where the printing will be trancated then prevented it from trancated by formatting your pages such that data will not be printed in that region.

  • Report generation using jsp

    I am developing a website using jsp on tomcat.The site required a number of online report generation option from database(mysql).
    My problem is-
    1.how to generate different types of report other than simple html tag embedded within jsp .
    2.How to store all those reports in a file(.txt or .doc).
    N.B I dont want to use any reporting tool.

    Mantosh,
    Have you seen this developer zone article which details accessing Citadel Data using COM+ and ADO?
    http://zone.ni.com/devzone/conceptd.nsf/webmain/725A6C3843F13C8786256EA600633724#6
    Also, this KB article provides more detail on how to access Citadel data using SQL commands and I think will help answer your question:
    http://digital.ni.com/public.nsf/websearch/C7D32F9A59D4637086256A7200692F30?OpenDocument
    --Paul Mandeltort
    Automotive and Industrial Communications Product Marketing

  • Oracle.xml.sql.OracleXMLSQLException when using OracleXMLQuery getXMLDOM()

    Hi!
    I am trying to reuse a code in JDeveloper to get XML from a query. I have copied the code from a method and created a new method with the copied code and changed it. The problem is that when I run the old code I now get following error:
    Ett oförväntat fel har inträffat: Application: FND, Message Name: FND_GENERIC_MESSAGE.
    Tokens: MESSAGE = oracle.xml.sql.OracleXMLSQLException: Det här objektet har stängts.
    Vill du inte att objektet ska stängas automatiskt mellan anropen kan du granska metoden 'keepObjectOpen()'.;
    This means in english something like:
    An unexpected error accoured: Application: FND, Message Name: FND_GENERIC_MESSAGE = oracle.xml.sql.OracleXMLSQLException: This object is closed. If you don't want the object to close automatically between calls you can check method 'keepObjectOpen()';
    the code I'm running is:
    public String punchoutSomething()
    throws Exception
    StringBuffer sqlForXml =new StringBuffer("select pv.*"
    +", cursor(select * from XXPOS_PUNCHOUT_TABLE2 c where c.vendor_id=pv.vendor_id) as contacts"
    +" from XXPOS_PUNCHOUT_TABLE1 pv where vendor_id in (");
    // add all ids
    SuppSummVOImpl vendorView = getSuppSummVO();
    Row row;
    int punchoutCnt=0;
    // vendorView.reset();
    Row[] selectedRows = vendorView.getFilteredRows("SelectStatus","Y");
    for(int i=0;i<selectedRows.length;i++)
    if(punchoutCnt>0)
    sqlForXml.append(",");
    sqlForXml.append(((Number)selectedRows.getAttribute("VendorId")).toString());
    punchoutCnt++;
    if(punchoutCnt==0)
    sqlForXml.append("-1"); // make sql valid, will not return rows
    sqlForXml.append(")");
    // System.out.println(sqlForXml); // DEBUG
    OADBTransaction tx = (OADBTransaction)getOADBTransaction();
    OracleXMLQuery xq = new OracleXMLQuery( tx.getJdbcConnection()
    , sqlForXml.toString()
    xq.setRaiseException(true); // in case of error raise an exception (default
    // is to generate an error document
    xq.setEncoding("UTF-8"); // not necessary?
    xq.useLowerCaseTagNames();
    xq.setRowsetTag("vendors");
    xq.setRowTag("vendors_row");
    //System.out.println(xq.getXMLString()); // DEBUG
    XMLDocument suppl = (XMLDocument)xq.getXMLDOM();
    XSLProcessor xslt = new XSLProcessor();
    InputStream sheetStream = this.getClass().getResourceAsStream("mystylesheet.xsl");
    if(sheetStream==null)
    throw new Exception("Could not load stylesheet");
    XSLStylesheet sheet = xslt.newXSLStylesheet(
    sheetStream
    StringWriter serialize = new StringWriter();
    xslt.processXSL(sheet,suppl,new PrintWriter(serialize));
    String returnXML = serialize.getBuffer().toString();
    // System.out.println("X:"+returnXML); // DEBUG
    sheetStream.close();
    return returnXML;
    ===================
    i've copied the same code into another method and only changed the sql-statment to be used and the stylesheet to use to transform the xml. Is something wrong with that?
    Another question: if the xsl refers to a xsd but wihtout any path where should it be?
    Thanks for the help,
    Patricia

    Actually, having looked at Metalink, seems that although this message may be accurate and correct,
    it has been 'introduced' as part of the 9i JDBC driver.
    So, I used the 8i JDBC driver I happened to have instead and that worked fine.

  • Can my apple tv 3rd generation use dual power 110v/220v without a converter?

    Can I use a 220 v power source for my apple tv without using a converter, it is a 3rd generation. I have moved to China and brought it with me from the US?

    HDMI is the only supported method. There will be no guarantee with any converter. If it does work you will be unable to play protected content (ie iTunes, Netflix)

  • Word Document generation using Perl programming on Windows Server 2003 R2

    Hello,
    Our application generates word document based on pre-defined template on Windows Server 2003 using Perl Scripting.
    Configuration data is fetched from the database and document is populated based on the template. Sections in the document are identified using Bookmarks. We are facing a problem on Windows server 2003 R2. When I do a group update operation, i.e generation
    of multiple word documents (using Word 2010) in a loop, one of the section of the word document shifts up  and data gets overlapped.
    When I use the same piece of code in windows 7 machine, the issue doesn't replicate.
    Can anyone provide some pointers to look into this issue ?
    Regards
    Prashant Jain
    software developer

    Hi,
    This forum is mailly talk about the product use related issue and not the best place to talk about the develop issue, for the develop issue we can post in MSDN forum for the further help.
    MSDN forum
    https://social.msdn.microsoft.com/Forums/en-US/home
    Thanks for your understanding and support.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Custom Employee Number Generation Using Fast Formulas

    Hi,
    I have a requirement to generate custom employee numbers like "EMP100001". we have already created a business group with the setting of Employee number generation as Automatic. but we need to generate custom employee number as Format given above instead of automatic number generation.
    I have created my own PL/SQL Package to generate custom employee number as per Person Type. Also created a Fast Formula Function with the following parameters -
    Name = Get_Custom_Number
    Data Type = Text
    Class = External Funtion
    Alias Name = NULL or what you want the alias to be
    Description = Returns the next custom number value
    Definition = CUSTOM_EMP_NUMBER_GENERATION.Get_Custom_Number (PL/SQL Function)
    Proving the following Context usages and Parameters details to the Fast Formula Function -
    Context usages:-
    Number = 1
    Context Name = BUSINESS_GROUP_ID
    Data Type = Number
    Parameters as defined in PL/SQL function
    1 p_legislation_code Text Input Only
    2 p_person_type Text Input Only
    3 p_person_number Text Input Only
    4 p_party_id Number Input Only
    5 p_person_id Number Input Only
    6 p_national_id Text Input Only
    7 p_date_of_birth Date Input Only
    Than i created a Fast Formula using the following navigation
    Total Compensation > Basic > Write Formula
    with following details -
    Name = EMP_NUMBER_GENERATION
    Type = Person Number Generation
    Description = Returns next Employee number
    and wrote my formula code.
    When i created a Employee from Enter and Maintain People screen it is showing automatic number instead of my custom employee number.
    I m not able to find where i m missing the logic or some parameters?
    If anyone has come across such situation, please provide some pointers here.
    Thanks
    Renu

    What is the application release?
    Please review these docs and see if it helps.
    Is it Possible to Update Generate Employee Number Method From Automatic to Manual? [ID 393827.1]
    Need To Change The Employee Numbering From Automatic To Manual [ID 291634.1]
    Unable to Switch From Auto to Manual for Employee Number Generation in Shared Hr [ID 452044.1]
    How to Prefix a Zero on Custom Employee Numbers [ID 822425.1]
    How To Implement Custom Person Numbering Using FastFormula Based on User Person Type Instead of System Person Type [ID 372696.1]
    Thanks,
    Hussein

  • Campaign Element generation using coding mask

    Hi Friends,
    Iam working on the automatic number generation for marketing/campaign plan generation. I have implemented the Note provided by SAP and everything is fine.
    The issue is with the campaign elements. I have used the coding mask to generate the campaign elements. Whenever i delete a campaign element and create a new one, the same number is used again. I mean the previously deleted campaign element numbers are generated again.
    Is there any standard way to create a new campaign element every time from the coding mask without re-using the deleted campaign elements.
    Thanks
    Raju

    Hello Narayan,
    Be more specific? Which version are you in? Is default badi activated? do you have any active custom implementation of  Badi CRM_MKTPL_OL_OBJ with code in method "external id generation".
    Are you using code masking along with the Badi activation. if you custom implementation of badi CRM_MKTPL_OL_OBJ, make sure you deactivate the default implementation.
    Some time this issue might be caused by conflict of multiple implementations active.
    Thanks & Regards
    Raja Pamireddy
    Moderator

Maybe you are looking for

  • Combine Aging report to Invoice in PLD????

    Dear Experts, I would like each invoice show the customer's balance under footnote when print out. I know that I have to combine the Aging report to Invoice Report in PLD layout design. I still have no clue how to do that. Anyone please share your id

  • Lookup in Range?

    Hiya folks. Just wondering if I can use a LOOKUP for a value in a range.  Example: Lookup value:  2300 Range table: Minimum Maximum Associate 1 999 alpha 1000 2499 bravo 2500 4999 charlie 5000 9999 delta 10000 19999 echo 20000 99999 foxtrot How can I

  • How does target display mode work? Where can I read about it?

    I was wondering how target display mode works?  On what models and which version of OS is this available?

  • I would like to manipulate a dissolve already in the timeline

    i went to two tutorials but the tech support guy says that feature went away in v8.2 is there another, new way?

  • How to Debug an ABAP Program

    Hi Friends, I am new to ABAP. Can anyone of you let me how to debug an ABAP program in detail. I would like to know whether my logic is working properly and see the field values during debugging. If any one of you have an How to document which speaks