FDK : element order, prop, ID?

Hello,
I need to develop an automate to get prop of an element before an action and to set it after the action.
Before an action, it will search all P elements of the document that are before B elements. P is Paragraph (pgf).
Rbody
--B
--P (this one will not be good)
Rbody
--P (this one will be good)
--B
So, i want to get all the ID and prop of P elements that are before B elements.
I have tried a lot of things like go from P to P and on each P find the next sibling element and check if it's B element :
//fdk guide code + custom
F_ObjHandleT docId, pgfId, nsibId;
StringT b;
b=F_StrCopyString((StringT)"B");
docId = F_ApiGetId(0, FV_SessionId, FP_ActiveDoc);
pgfId = F_ApiGetId(FV_SessionId, docId, FP_FirstPgfInDoc);
while (pgfId)
nsibId = F_ApiGetId(docId, pgfId, FP_NextSiblingElement)
if(F_StrCmpN(F_ApiGetString(docId, nsibId , FP_Name), b, F_StrLen(b)==0)
F_Printf(NULL, "I'M VERY HAPPY\n");
pgfId = F_ApiGetId(docId, pgfId, FP_NextPgfInDoc);
it doesn't work, nsibId is 0.
it seems that i need to make a selection of the text but i'm not sure...
I don't well understand the logic to navigate through a document.
Do you know how to make this?
Thank you,
Alexandre

Hi Alexandre,
You are going about this the wrong way. If you are attempting to navigate a structure tree, you need to start with element IDs, not paragraph IDs. Basically, you should:
1 - Get the ID of the flow that contains the structure tree, maybe something like:
flowId = F_ApiGetId(FV_SessionId, docId, FP_MainFlowInDoc);
2 - Get the ID of the highest-level element in the flow, something like:
elemId = F_ApiGetId(docId, flowId, FP_HighestLevelElement);
... then you can use the FP_FirstChildElement, FP_NextSiblingElement, etc. properties of the elemId to walk through the tree. You can't call FP_NextSiblingElement on a paragraph ID because this is an element property only... paragraphs have no concept of parents, children, and siblings.
Also, to get the name of an element, you need to get the name of its underlying element definition. Something like:
F_ObjHandleT elemDef;
StringT elemName;
elemDef = F_ApiGetId(docId, elemId, FP_ElementDef);
elemName = F_ApiGetString(docId, elemDef, FP_Name);
...in other words, you can't get the tag name directly from the element. The name is a property of the element definition in the imported EDD.
Russ

Similar Messages

  • JAXB, element order and optional elements

    Hi,
    I am trying to write a program that depends on JAXB and I am encountering a number of problems. The first is that the party from which we get our XML data from is capable of sending the elements in a given element in any order and JAXB is very stringent about order, is there any way to override this behaviour? The next, is if an element, that has children, is marked as optional in the DTD, JAXB will treat it as mandatory which also creates problems for us as some of these type of elements are optional.
    Does anyone know when JAXB ea2 is due?

    To your second topic, this is a known bug in the EA, see
    http://developer.java.sun.com/developer/bugParade/bugs/4497267.html
    To the first topic: If you define the DTD in a way, that the element order is not fixed, then JAXB should accept that. E.g. instead of<!ELEMENT foo (a,b,c)>you could write<!ELEMENT foo ((a|b|c)*)>Of course, this is even looser, as it does not prevent you from sending multiple instances of a, b and c, and the generated code does not contain a getA, getB and getC method, but just a getContent returning a List.

  • Element order is not preserved in NESTED TABLES.

    I may be silly, but I cant understand it.
    Steven Feurenstein : Unlike nested tables, when you store and retrieve a VARRAY, its element order is preserved.
    Element order is not preserved in NESTED TABLES.
    What does it mean?
    Thanks..

    Could you please give an example?He just did? A nested table is really a table like any other, so the same rule applies: if you want the data selected in a specific order, you must use ORDER BY.

  • WBS Element - Order Number Relationship

    Hi,
    I need to know the specific Order Number (example: PM order) with cost posting on WBS element.  I am use COVP / COEP field OBJNR to see the WBS Element (those starts with PR*), but I do not know which field is the Order Nmber contained in the table.
    Please advise in which table can I see the linkage between WBS and Order number for cost postings.
    Thanks!
    Regards,
    Vivian

    hi,
    plz go thru following thread.Might be it will help u
    WBS Conversion Routines
    Conversion - Internal number to External number
    WBS element
    <b>plz reward if useful</b>

  • XML Elements Ordering in Generated XML Output

    I have a requirement where I need the xml element tags to appear in the generated xml output in the same order as in data template definition but in my case this is not happening. I have one master group - Customer and two subgroups - BillingAddress and ShipToAddress. The subgroups appear below some master elements eg. Contact but above other master elements eg. Telephone . However when the xml output is finally generated all the Master Elements appear first followed by the subgroup elements. Does anyone know how I can rectify this?
    See below:
    my data template structure is as follows:
    - <group name="Customer" dataType="varchar2" source="Q_MASTER_FILE_CUST">
    <element name="CustomerID" datatype="varchar2" value="CUSTOMER_NUM" />
    <element name="CustomerTaxID" datatype="varchar2" value="TAXPAYER_ID" />
    <element name="CompanyName" datatype="varchar2" value="COMPANY_NAME1" />
    <element name="Contact" datatype="varchar2" value="CONTACT_NAME" />
    - <group name="BillingAddress" dataType="varchar2" source="Q_MF_CUST_BILLTO">
    <element name="BuildingNumber" datatype="varchar2" value="BUILD_NUM1" />
    <element name="StreetName" datatype="varchar2" value="STREET_NAME1" />
    <element name="AddressDetail" datatype="varchar2" value="ADDRESS_STYLE1" />
    <element name="City" datatype="varchar2" value="CITY1" />
    <element name="PostalCode" datatype="varchar2" value="POSTAL_CODE1" />
    <element name="Region" datatype="varchar2" value="COUNTY1" />
    <element name="Country" datatype="varchar2" value="COUNTRY1" />
    </group>
    - <group name="ShipToAddress" dataType="varchar2" source="Q_MF_CUST_SHIPTO">
    <element name="BuildingNumber" datatype="varchar2" value="BUILD_NUM2" />
    <element name="StreetName" datatype="varchar2" value="STREET_NAME2" />
    <element name="AddressDetail" datatype="varchar2" value="ADDRESS_STYLE2" />
    <element name="City" datatype="varchar2" value="CITY2" />
    <element name="PostalCode" datatype="varchar2" value="POSTAL_CODE2" />
    <element name="Region" datatype="varchar2" value="COUNTY2" />
    <element name="Country" datatype="varchar2" value="COUNTRY2" />
    </group>
    <element name="Telephone" datatype="varchar2" value="PHONE_NUMBER" />
    <element name="Fax" datatype="varchar2" value="FAX1" />
    <element name="Email" datatype="varchar2" value="EMAIL_ADDRESS" />
    <element name="WebSite" datatype="varchar2" value="URL" />
    </group>
    </group>
    My XML Output is as follows:
    <Customer>
    <CustomerID>1000</CustomerID>
    <CustomerTaxID>65-94238654</CustomerTaxID>
    <CompanyName>World of Business</CompanyName>
    <Contact>MS. Jolene Smith-Kelly</Contact>
    <Telephone>8441212</Telephone>
    <Fax />
    <Email />
    <WebSite />
    - <BillingAddress>
    <BuildingNumber />
    <StreetName />
    <AddressDetail />
    <City>San Jose</City>
    <PostalCode>95053</PostalCode>
    <Region>Santa Clara</Region>
    <Country>US</Country>
    </BillingAddress>
    - <ShipToAddress>
    <BuildingNumber />
    <StreetName />
    <AddressDetail />
    <City>San Jose</City>
    <PostalCode>95053</PostalCode>
    <Region>Santa Clara</Region>
    <Country>US</Country>
    </ShipToAddress>
    </Customer>
    It should be as follows:
    <Customer>
    <CustomerID>1000</CustomerID>
    <CustomerTaxID>65-94238654</CustomerTaxID>
    <CompanyName>World of Business</CompanyName>
    <Contact>MS. Jolene Smith-Kelly</Contact>
    - <BillingAddress>
    <BuildingNumber />
    <StreetName />
    <AddressDetail />
    <City>San Jose</City>
    <PostalCode>95053</PostalCode>
    <Region>Santa Clara</Region>
    <Country>US</Country>
    </BillingAddress>
    - <ShipToAddress>
    <BuildingNumber />
    <StreetName />
    <AddressDetail />
    <City>San Jose</City>
    <PostalCode>95053</PostalCode>
    <Region>Santa Clara</Region>
    <Country>US</Country>
    </ShipToAddress>
    <Telephone>8441212</Telephone>
    <Fax />
    <Email />
    <WebSite />
    </Customer>
    is anyone able to advise?
    Rani

    If you know the changes necessary then you could write an XSL transformation to do them. But a generalized piece of code that examined an XML document and a schema, then produced a corrected document, would be quite difficult to write.

  • Photoshop Elements 10 - Proper Settings for Creating Graphic for Film

    Hi, I'm fairly new to Photoshop Elements. What would be the proper project settings and export settings when creating a quality graphic for using in a film? (I'm using Premiere for video editing.)
    Thank you so much for your time and patience. I've been referring to google and haven't pulled up anything yet, not sure if I'm just not putting in the right terms.
    -M.

    Hi,
    Here are some links of Adobe tv and Elements help page to get more about this application.
    http://tv.adobe.com/show/learn-photoshop-elements-10/
    PSE 10 help
    http://help.adobe.com/en_US/PhotoshopElements/10.0/Using/index.html
    PSE 11 help
    http://helpx.adobe.com/photoshop-elements.html
    thanks,
    earth-star

  • XML Elements Ordering according to XSD

    I have a XML document having XML Tags out of order but have parent child relationship intact. I have a XSD to follow. How do i convert this XML document instance into the properly ordered (Elements) XML document instance progrmatically. Need some pointers......
    For Example XSD states that <Text> should follow <Info>
    Input
    <example>
    <Text>Hello</Text>
    <Info>Text1</Info>
    <example>
    OutPut needed
    <example>
    <Info>Text1</Info>
    <Text>Hello</Text>
    <example>
    Thanks for your Help.

    If you know the changes necessary then you could write an XSL transformation to do them. But a generalized piece of code that examined an XML document and a schema, then produced a corrected document, would be quite difficult to write.

  • Elements order in Nested Tables

    In PL/SQL when I am adding element to a nested table of objects one by one(in order), and then trying to insert that nested table type to a physical table , the order of element changes. how can I prevent this behavior?

    Your example is incomplete and has errors. Oracle does not guarantee the order of anything unless you use an order by clause. So, if you expect the following to produce rows in some order:
    Open cur1 for select * from another_table;
    then you need to add an order by clause, such as:
    Open cur1 for select * from another_table order by id;
    The following does minimal correction, completion, and provides sample data to demonstrate:
    SCOTT@orcl_11gR2> create or replace TYPE coord AS OBJECT
      2    (id  number,
      3       x   number,
      4       y   number);
      5  /
    Type created.
    SCOTT@orcl_11gR2> create or replace TYPE coord_tab AS TABLE OF coord;
      2  /
    Type created.
    SCOTT@orcl_11gR2> create table demo_table
      2    (id     number,
      3       coords     coord_tab)
      4  NESTED TABLE coords STORE AS coords_tabb
      5  /
    Table created.
    SCOTT@orcl_11gR2> create table another_table
      2    (id  number,
      3       x   number,
      4       y   number)
      5  /
    Table created.
    SCOTT@orcl_11gR2> insert into another_table values (10, 20, 30)
      2  /
    1 row created.
    SCOTT@orcl_11gR2> insert into another_table values (60, 50, 40)
      2  /
    1 row created.
    SCOTT@orcl_11gR2> DECLARE
      2    type cur is ref cursor;
      3    cur1 cur;
      4    type rec_type is record
      5        (id  number,
      6         x   number,
      7         y   number);
      8    record_type rec_type;
      9    coords_tab coord_tab := coord_tab();
    10    idx number := 1;
    11  BEGIN
    12    Open cur1 for select * from another_table order by id desc;
    13    LOOP
    14        fetch cur1 into record_type;
    15        exit when cur1%notfound;
    16        coords_tab.extend() ;
    17        coords_tab(idx) := coord(record_type.id, record_type.x , record_type.y);
    18        idx := idx + 1;
    19    End LOOP;
    20  --  EXECUTE IMMEDIATE 'insert into demo_table values (1,:1)' USING coords_tab ;
    21    insert into demo_table values (1,coords_tab);
    22  End;
    23  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> select * from demo_table
      2  /
            ID
    COORDS(ID, X, Y)
             1
    COORD_TAB(COORD(60, 50, 40), COORD(10, 20, 30))
    1 row selected.
    SCOTT@orcl_11gR2>

  • XML Element Order

    Hi, we deployed an app that has a web service component in 10.1.2.2 oid install of AS.
    in dev we get the output of a certain web service call as
    <?xml version="1.0" encoding="UTF-8" ?>
    - <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <SOAP-ENV:Body>
    - <ns1:getUserOrgEntitiesIdNumsResponse xmlns:ns1="http://com/fmcna/core/security/api/helpers/ISecurityHelper.wsdl" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    - <return xmlns:ns2="http://com.fmcna.core.security.api.helpers/ISecurityHelper.xsd" xsi:type="ns2:com_fmcna_core_security_api_businessobjects_UserOrgEntitiesIdNums">
    - <idNames xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:Array" ns3:arrayType="xsd:string[1]">
    <item xsi:type="xsd:string">MACON</item>
    </idNames>
    - <idNums xmlns:ns4="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:Array" ns4:arrayType="xsd:string[1]">
    <item xsi:type="xsd:string">1440</item>
    </idNums>
    <loginID xsi:type="xsd:string">0001440</loginID>
    <numList xsi:type="xsd:int">1</numList>
    </return>
    </ns1:getUserOrgEntitiesIdNumsResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    in qa the same call gives us
    <?xml version='1.0' encoding='UTF-8'?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <ns1:getUserOrgEntitiesIdNumsResponse xmlns:ns1="http://com/fmcna/core/security/api/helpers/ISecurityHelper.wsdl" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <return xmlns:ns2="http://com.fmcna.core.security.api.helpers/ISecurityHelper.xsd" xsi:type="ns2:com_fmcna_core_security_api_businessobjects_UserOrgEntitiesIdNums">
    <loginID xsi:type="xsd:string">0001440</loginID>
    <numList xsi:type="xsd:int">0</numList>
    <idNames xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:Array" ns3:arrayType="xsd:string[0]">
    </idNames>
    <idNums xmlns:ns4="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:Array" ns4:arrayType="xsd:string[0]">
    </idNums>
    </return>
    </ns1:getUserOrgEntitiesIdNumsResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    the order of the elements in dev are
    idNames
    idNums
    loginID
    numList
    in qa it is
    loginID
    numList
    idNames
    idNums
    can anyone tell us why we would expect a behaviour like this...
    thanks
    ravi

    Hallo,
    I have same problem but all parameters seems ok...
    <Table> is an invalid table element or appears in the wrong order.
    <variant>
      <Table xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0" xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" aid5:tablestyle="Art.-Table" aid:table="table" aid:trows="64" aid:tcols="7">
        <cell aid5:cellstyle="Art.-Cell" aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="58">
    I am using Indesign CC 2014

  • PLSQL webservice element order and minOccurs="0"

    Hi,
    When i generate a webservice based on a plsql procedure that makes use of types the order of the elements for the types in the generated wsdl is random, i would expect it to be the same as defined in the database object type. Also i am missing attributes like minOccurs="0" for input parameters that can be null in the procedures. Currently i must edit the wsdl after generation to solve both issues but i loose those changes after regeneration of the webservice, which causes me to apply the changes again after every regeneration. Can this be solved ...?
    Kind Regards,
    Andre Jochems

    Just found the following information:
    Re: PL/SQL Webservice and XMLType return and xsd mapping
    which helped me a little bit. But after importing the XSD into the WSDL and trying to deploy, JDeveloper tells me there's a compilation error, and nothing else. Since I can't find a way of it to give me more info about this error, I try to run it locally, and this happens:
    Error instantiating web-application
    Error compiling :E:\jdevstudio10133\jdev\mywork\incexc\ws\public_html: Syntax error in source or compilation failed in: E:\jdevstudio10133\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\application-deployments\current-workspace-app\incexc-ws-webapp\sirc\runtime\InicialElement_LiteralSerializer.java E:\jdevstudio10133\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\application-deployments\current-workspace-app\incexc-ws-webapp\spcdes\runtime\IncexcSoapHttp_Tie.java:59: error #300: method inicial(sirc.InicialElement) not found in interface spcdes.Incexc
    ((spcdes.Incexc) getTarget()).inicial(myInicialElement);
    ^
    Is this related to types being different among the auto-generated files and the wsdl? What else do I have to edit to get it working? Before someone directs me to google again, I already went there and it directed me back here:
    Regenerating webservice from pl/sql package (error)
    which so far is a dead end.
    Any thoughts? I'd really like to know what options should I pick before generating the Webservice from the PL/SQL, considering how I'll import the xsd into the wsdl later. Is there any prior type mapping involved, should it be document literal, anything?
    Thanks.

  • Alphabetical or numerical order option for elements?

    I am trying to create a 360 view for a product but when I import more than 1 image at a time I am given the issue where in the library, the files will be alphabetical order but the elements are in almost random order. This is causing issues in creating a 360 view due to not being in the proper order. I have 100 images that need to be imported and I don't want to import every image one at a time for every single product. Is there anything that can be done so I can get all the elements in proper importing order like in the library?

    I reported this bug and it will be corrected in next version. For this one you are out of luck  and will have to move the layers manually. If you had acccess to a version 2, you could load your images in there, save and re-open in version 3.0.

  • Error in file export when order of elements in build array changes

    Hi everyone,
    A while ago I wrote a vi file which does the following:
    At first it initializes a camera and chooses a region of interest (ROI). Data out of the ROI will be discarded.
    Then it raster scans a motor stage in x and y direction, in bidirectional mode (meaning that x alternates between scanning from left to right and right to left as y is inreased).
    For each point of the scan, the spectrum is collected, which is then integrated in lambda to give an idea of the total intensity.
    Then the intensity is plotted, along with the spectrum at each point.
    The final results are exported in a text file.
    The problem:
    If I flip the order of the wires in the "build array" before the file export, placing the Total Count (intensity) wire in place of the Spectrum wire, the file export fails. What I mean by "fails" is that the .txt file contains characters that look like chinese!
    Why is that?
    I attach my .vi as well as two screenshots which demostrate the problem.
    Solved!
    Go to Solution.
    Attachments:
    correct.png ‏182 KB
    Wrong.png ‏180 KB
    1.7z ‏119 KB

    mikeporter wrote:
    Hey Jeff... The changes you recommend are all good (and necessary) but the thing I'm stuck on is that regardless of what happens to the floating point data, there's that built-in VI that changes it to string representations of the numbers. And as I understand it, that is where the problem is.
    Mike...
    PS: Coming to NI Week?
    Not this year
    What scared me was the sgls on a SLs with no wire branch to force a data copy which, would force LabVIEW to preserve the sgls since the SL might need to be used again then, they get all mixed up building arrary out of mixed coerced sgls and dbls.  With the potential of a miss-reussed buffer (not uncommon in 2011) confusing the string operations in the write to spreadsheet.   The problem of course, must exist outside of write to spreadsheet file since it only exhibits with a build array element order change.  Or, we all are halucinating (Possible alternate theory)  
    Jeff

  • RescaleOp elements out of order

    I'm using the RescaleOp class to apply translucency to an image as needed.
    This class takes an array of floats and uses them to scale the elements of a BufferedImage, like this:
    float[] scale = { 1f, 1f, 1f, 0.5f };
    However, the elements are not in expected order, and this is causing problems because I can't expect the order to always be consistent, and because I don't know how to programatically check the correct image order.
    In one case, I have a buffered image of type TYPE_INT_ARGB.
    But RescaleOp treats the elements as RGBA, with the last element influencing the alpha.
    I have another image, TYPE_4BYTE_ABGR.
    In this case, RescaleOp applies the four scale elements in a different order: RABG.
    Just out of curiosity, I changed another image to use 4BYTE_ABGR instead of INT_ARGB, but RescaleOp still treats that image as RGBA.
    It seems to be totally unpredictable how its going to apply the elements I give it. It does not match the image type.
    How do I determine, programatically, what order it wants to treat the elements?

    Nevermind.
    Predictably, the case where I changed the image to 4BYTE_ABGR yet RescaleOp treated it the same way was a careless error.
    So I can reliably use BufferedImage.getType() to get the image type and the element order.
    RescaleOp reorders the elements as 1230, so that ARGB becomes RGBA and ABGR becomes RAGB.
    I can't fathom why, and its not in the java doc, but it does so consistently, so I can work with that.
    Sorry for posting this question before exploring it further. I would delete it, but I'm writing this on here so that if anyone else runs into the same situation, they'll find it on Google.

  • Two Elements in Main Window

    Hello,
    I am working on sapscript. MAIN window has two elements ( Order Info, Carrier Info. ) First page display only 1 - 10 records for each element in Main Window.
    ( In my scenario, it's possbile the either one of the element may have more then 10 record but 11th record should print in that section of Next Page )
    Next page should display starting with record 11 on subsequent elements. How can i accomplish this scenario.
    I apperciate your help.
    Thanks
    Hitesh

    Hi,
    in driver program, count the sy-tabix if it reaches '11', then call the FM 'CONTROL_FORM' and in the command give 'NEW-PAGE' and then call the WRITE_FORM of 2nd element.
    write code like below in ur driver program.
    eg:
    data : gv_tabix.
    LOOP AT itab.
    gv_tabix = sy-tabix.
      IF sy-tabix LE 10.
       call function 'WRITE_FORM'
        EXPORTING
          element = element1
        EXCEPTIONS
        ENDIF.
        IF gv_tabix GT 10.
           call function 'CONTROL_FORM'
             exporting
                command = 'NEW-PAGE'.
           clear gv_tabix.
        ENDIF.
        IF sy-tabix GT 10.
           call function 'WRITE_FORM'
        EXPORTING
          element = element2
        EXCEPTIONS
        ENDIF.
    ENDLOOP.
    dont forget to give NEXT PAGE for first page as 'FIRST PAGE' name.
    Hope it resolves
    Rgrds,
    Pavan

  • XmlAgg Order By in SQL Statement vs Stored Procedure - 9.2.0.3.0

    Hi All,
    I'm having a problem with the XMLAgg function's ORDER BY clause after upgrading to 9.2.0.3.0.
    I'm finding that I can succesfully execute a SQL statement with the XMLAgg ORDER BY clause, but cannot compile a stored procedure using ORDER BY. Below are two examples executing against the SCOTT Schema. They use the same code, except one is contained in a procedure.
    I'm running 9.2.0.3.0 on Windows XP Pro, SP1
    Plain SQL Statement (executes correctly):
    SELECT
    XMLElement("test",
    XMLAgg(
    XMLElement("element",
    XMLAttributes(Scott.Emp.Ename as "ename", Scott.Emp.Empno as "enum")
    ) --xmlElement element
    ORDER BY Scott.Emp.Ename desc
    ) --XmlAgg
    ).getClobVal() --xmlElement test
    as TestXML
    from Scott.Emp;
    Stored Procedure:
    create or replace procedure zorder(TestXML OUT clob) is
    begin
    SELECT
    XMLElement("test",
    XMLAgg(
    XMLElement("element",
    XMLAttributes(Scott.Emp.Ename as "ename", Scott.Emp.Empno as "enum")
    ) --xmlElement element
    ORDER BY Scott.Emp.Ename desc
    ) --XmlAgg
    ).getClobVal() --xmlElement test
    into TestXML
    from Scott.Emp;
    end zorder;
    I get the following errors when attempting to compile the stored procedure:
    7 PLS-00306: wrong number of types or arguments in call to 'XMLAGG'
    7 PL/SQL: ORA-00904: "XMLAGG": invalid identifier
    5 PL/SQL: SQL Statement ignored
    Does anybody know why this code executes correctly in a SQL statement, but fails in a procedure? Is the Order By clause not available in a procedure? I need to get this functionality working in the procedure.
    Thanks,
    Brian

    A good simple workaround (that doesn't require runtime parsing) is to simply sub-query:
    SELECT
    XMLElement("test",
        XMLAgg(
            XMLElement(
                "element",
                XMLAttributes(Scott.Emp.Ename as "ename", Scott.Emp.Empno as "enum")
            ) --xmlElement element
        ) --XmlAgg
    ).getClobVal() --xmlElement test
    into TestXML
    from (
        SELECT Ename,Empno
        FROM Scott.Emp
        ORDER BY Scott.Emp.Ename desc

Maybe you are looking for

  • Can I used the same apple id on all six of my devices?

    I have a mac desk top, macBook air, two iPads, an iPhone and a iPod touch. Can I use one apple id for all devices?  I only use one email address and would like all of my devices to use the same email and apple id. Is this possible?  If so how do I do

  • After OS & App SW install, hard drive disappears - HELP!

    I'll preface this by saying that this is likely a user problem, but nonetheless it's a problem.  I have a new K8MM motherboard with an AMD Athlon 64 3000+ CPU.  512MB PC3200 DDR, 200GB IDE drive, DVD-R/W that I got my son for Christmas.  We wanted to

  • How to view fault schema under variable structures in alsb

    We are not able to view the fault element in our alsb flow under body variable and when we get the error in test console the error comes in bea fault schema,but we want the error in our own defined fault schema.Pls. guide. Below are the steps we foll

  • Question about AppleScript, iTunes and the app Proximity...

    So I have this application Proximity, which uses bluetooth's proximity to the cpu to run both an out-of-range script and and in-range script. I'm currently using it to activate my screensaver with password lock and vice versa. I'm also using it to sy

  • Erro during Building of DC

    Hi All, Am getting the following error while "Building" the DC Component. [wdgen] ERROR: Unknown exception during generation null (com.sap.webdynpro.generation.ant.GenerationAntTaskError)      [wdgen] ERROR: Generation failed due to errors (1 seconds