How to create dynamic LINE tag XML

I have a procedure as follows:
create or replace procedure show_xml (v_xml ON clob) AS
qryCtx DBMS_XMLGEN.ctxHandle;
v_query varchar2 (2000);
Start
v_query: ='SELECT case_id, status, resolution of t_cases where rownum < 4';
qryCtx: = dbms_xmlgen.newContext (v_query);
-the value of the row header to be cases
DBMS_XMLGEN.setRowTag (qryCtx, 'Case');
-now to get the result
v_xml: = DBMS_XMLGEN.getXML (qryCtx);
dbms_xmlgen.closeContext (qryCtx);
END;

After running the procedure header line will be "box. Can we define the header of the row that contains dynamic content somehow.
For example I need the output as shown below:

<? XML version = "1.0"? >
rowset <>
< case extensible index = "1" >
< CASE_ID > 970200 < / CASE_ID >
< STATUS > CLO
SED < / STATUS >
< RESOLUTION > Load Off reserved < / RESOLUTION >
< / Body >
< case extensible index '2' = >
< CA
SE_ID > 970670 < / CASE_ID >
CLOSED < status > < / STATUS >
Immediate rejection < RESOLUTION > <
/ RESOLUTION >
< / Body >
< case extensible index '3' = >
< CASE_ID > 980030 < / CASE_ID >
CLOSED < status > < / STAT
U.S. >
Avoidance Total < RESOLUTION > < / RESOLUTION >
< / Body >
< / LINES >

We do anyway?

Why use the PL/SQL, when a single SQL statement is all that is needed to generate the XML?
H3. Optimize SQL. Minimize the PL/SQL.

SQL> select
  2          xmlRoot(
  3                  xmlElement( "RowSet",
  4                          xmlAgg(
  5                                  xmlElement( "case",
  6                                          xmlAttributes( rownum as "repeating_index" ),
  7                                          xmlForest(
  8                                                  object_name,
  9                                                  object_type
 10                                          )
 11                                  )
 12                          )
 13                  ),
 14                  VERSION '1.1',
 15                  STANDALONE YES
 16          )                               as XML
 17  from       user_objects
 18  where      rownum < 4
 19  /

XML
----------------------------------------------------------------------------


  
    INSERTEMP
    PROCEDURE
  
  
    EMMP
    TABLE
  
  
    FOO
    TABLE PARTITION
  


SQL>      

Tags: Database

Similar Questions

  • Dynamic text called XML - how to create a line break

    I'm the filling of an area of dynamic text with xml elements that I call

    For example, I have two text fields and fill me help

    TextTime.texttest.Text = (bktrlXml.Row, [e.currentTarget.Ivar], .tester);

    TextTime.textName.Text = (bktrlXml.row [e.currentTarget.ivar]. NAME2);

    How do I fill in a dynamic text field using a combination of the two above?  I would also like to put a line break between the two elements.  I tried something like that and could not understand it

    TextTime.texttest.Text = (bktrlXml.Row [e.currentTarget.Ivar] .tester) + "/ n" (bktrlXml.row [e.cur rentTarget.ivar]. NAME2);

    Thanks in advance...

    -j

    Use the back slash, not oblique:

    TextTime.texttest.Text = (bktrlXml.Row [e.currentTarget.Ivar] .tester) + "\n" + (bktrlXml.row [e.cu rrentTarget.ivar]. NAME2);

  • How to create dynamic ObjectChoiceField?

    Hello friends,

    I want to create the search section for what I want to create dynamic choiceField. Tell me how to create that. I want 4 field of choice.

    Select the Continent-> Africa, Asia, Europe, America, South America, Antarctica, Oceania
    Select the country
    Select the region
    SELECT City

    here if I select Asia I want to show in the field of choice throughout Asia of County County, after that, if I sect Asia County I want to show all the area of that County and if I show a region that show the whole of the region. Than please tell how I do?

    It doesn't matter what Web service?

    How I do?

    you found NPES because obj_country is null.

    I think you can try with the recording of information in text files.

    String str_continent[]= new String[]{"Select Continent","Africa", "Asia", "Europe"," North America", "south America"," Antarctica","Oceania"};
    final ObjectChoiceField obj_Country=new ObjectChoiceField();
            obj_Country.setLabel("Countries");
    final ObjectChoiceField obj_continent=new                                                                                         ObjectChoiceField("Continent",str_continent){
             protected void fieldChangeNotify(int context) {
            if(getSelectedIndex()==2)
                    {
    InputStream in = getClass().getResourceAsStream("Asia.txt");
    String[] asianCountries =new  String[0];
    try {
    asianCountries = StringUtilities.stringToWords(new String(IOUtilities.streamToBytes(in)));
    } catch (IOException e) {
    e.printStackTrace();
    }
    
                        obj_Country.setChoices(asianCountries);}
    super.fieldChangeNotify(context);
                }
            };
    
            add(obj_continent);
            add(obj_Country);
    
  • How to create dynamic arrays parallel/side-by-side in Adobe cycle

    Is it possible to create dynamic arrays parallel/side-by-side in Adobe cycle?  If so, how?

    Given that the tables have different sizes, in that I am running wrapping issues with running adjustment of Western characters and characters from the pagination with checkpoint.  Any other ideas?

    In fact, I had tried this solution ("wrapping the tables in a subform of position and set to automatically adjust the height and allow page breaks"), but it did not work.  Something to do with nested subforms of position within a subform control flow etc.  So to make it work, I set the page to be a subform of position and the auto-hauteur value and allow page breaks and I unpacked the paintings while they were only 'wrapped up' of the page itself.

  • How to create a css tag that defines my bg?

    I created a css tag that defines my bg and how it is displayed, but I have no idea on how to apply it to my pg... or if I did it the right way. If someone could provide a tutorial or a statement that would be greatly appreciated.

    Thank you

    dsterlinjustin wrote:
    > I created a css tag that defines my bg and how it is displayed, but I did not
    > hint on how to apply it to my pg... or if I did it the right way. If
    > could someone provide a tutorial or a statement that would be greatly
    > appreciated.
    >
    > Thank you
    >

    If you want the background image to display behind the rest of the
    content on your page you will have to fix on the "body" tag

    {body
    background-image: url (yourimagename.jpg);
    background-repeat: no-repeat;
    basic position: top-center;
    }

  • How to create dynamic Services based on VMware files

    Hello

    We would like to create as many services as VMware folders in VMware, so whenever we will be add/remove any computer file VMware virtual of the service components will also be day/follow-up...

    We check the option "Create a rule to include a group of components" in the function Builder, and adding the conditions of rule as:

    ! VFolder where name like ''.

    But the result is not successful, because we are unable to choose the right component that inherites the VFolder type components...

    The same works of query in the "Script Console" and the children of the property spreads with all virtual machines...

    Any ideas?

    Thank you.

    Hi Eneko

    One of our systems Consultants found a carton of community that creates dynamic records VMWare-based services. I have attached the cartridge and I included some comments from the author, Thomas Bryant.

    I am pleased to announce the release of version 1.0 of a cartridge personalized for VMware files.  I had a lot of customers ask me to automatically build services in vFoglight based on the structure of folders in vCenter, and that is exactly what will make this cartridge!  This cartridge contains a rule that runs once per hour and will create a category called files VMware services and then for each vCenter, the data center and the series of records, create services and add virtual machines to each, as in vCenter.  Simply load the cartridge and wait about 30 to 60 seconds depending on the number of files you have, and then services will be created.  Please let me know if things work, good or bad.

     

    Updated - Version 1.0.1 released

    The update fixes a problem with the sort order of the structure "Virtual Machines and templates" vs "Hosts and Clusters" and the following files which were not created properly.

     

    Known issues - currently will not remove a service based on a folder that has been deleted from vCenter.  I'll look to add this in the next version.

    One last thing. After you install the cartridge, a new rule, named Custom - create/update records VMware will be added under VMware_Folders cartridge. If edit you it and look at the Conditions & Actions tab, you should be able to see the groovy script that is used to create and populate the services. Here, you should be able to edit the prefix added to each folder in Foglight. By default, the prefix is "Folder_.

    I hope that this solution is satisfactory for you,

    Kind regards

    Gaston.

  • How to create the new Custom XML report without the use of the form builder

    Hello

    What are the steps to create the new Custom XML report without using the Report Builder?

    Thank you and best regards,
    Aerts

    Aerts,
    Can you clarify your question more away!

    -bifacts
    http://www.obinotes.com

  • How to create multiple lines of text with effects?

    New to first...

    I can create a static title without any problems and as well to animate it.  My challenge is that I don't know how the first manages text effects.  I can't understand how to do something as simple as have several bullet point text dissolve of lines on the screen in the order. I use a few "Pro-sumer" software video editing with all sorts of creative text effects.  But, I get more large projects that require more sophisticated tools, so I jumped on the first.  I watched all the videos on the web "creation of text"... impossible to find something on this topic to the Prime Minister.  Help, please!

    Thank you

    Tom

    Meg answer is technically correct, but a lot of your time, especially if you have to re-do something later.

    When I have the multiline text that I don't want to animate with After Effects, I create text on a title, and then I copy and paste from there to place its own title of each line of text.

    Then I put all these titles on the timeline, stacked in layers, one over the other.

    From there, I can change the time where each line of text within the framework. I can use normal transitions to do this, wipe, dissolve, or push. My most recent favorite is IMPACT PUSH, which you can get for free, here: https://www.filmimpact.net/plugin/transition-pack-1/

    Indeed, After Effects is the best option by far, if you want to do anything fancy or cool.

  • How to create dynamic action of the link column in the classic report

    I have an apex page to display a modal window using jquery. In the modal window, I have a classic report with a column of link I want to capture its click event.
    I thought I could create a dynamic action with selection of type = jquery selector. Not sure if I need to do anything on the link column and do not know the syntax
    jquery selector. Would appreciate help or direction?

    Always zip code using .

    ...\
    

    tags as described in the FAQ.

    I created a region of report with the following query:

    Select empno, ename, 'SELECT' from emp
    where (ename like '%'||ltrim(rtrim(:P2_SEARCHPU))||'%'
    or :P2_SEARCHPU is null)
    

    There is no alias specified for the "SELECT" column, Oracle uses so the content of the column as a default alias. It comes

    'SELECT'
    

    Instead of

    SELECT
    

    The necessary jQuery selector would be:

    td[headers="\'SELECT\'"] a
    

    However the need to release the single quote everywhere is a ticking time bug. SELECT an Oracle reserved word means use it as any type of identifier is either too smart.

    You should always use a valid Oracle identifier as an alias explicit when a column contains a literal value or a complex expression:

    select
        empno
      , ename
      , 'SELECT' link_text
    from
        emp
    where
        (  ename like '%'||ltrim(rtrim(:P2_SEARCHPU))||'%'
         or :P2_SEARCHPU is null)
    

    APEX will use the column alias LINK_TEXT as the ID attribute of the column header and the cells in the column will reference it in their headersattributes. The jQuery selector is:

    td[headers="LINK_TEXT"] a
    
  • How to create dynamic vats in a triangle...

    Dear friends,

    IAM creating the dynamic triangle... same as below:

    http://www.mathopenref.com/cosine.html

    I am struck upward in the creation of the shape of the curve near the corner (A) & B. Please tell me how do it curves dynamic... I have to finish my project soon... pls help me...

    Thank you and advance...

    use graphics methods.  in particular, the lineTo() method.

  • How to create dynamically a selecItems in a PGAE to a table

    For those who would be able to help:

    I use JDeveloper 10.1.3.4. In my application, I need to put a number of tags selectItem such as radio buttons on a page. What is difficult about this, is that it cannot be known in advance how many radio buttons will be, because is depends on how many rows is selected a table, even if we know that the number of selected lines will not exceed 3. I am considering using the radio button because it looks better on the page and the user must select only one.

    Some examples of rows in the table:
    TERM    AVAILABLE  SWITCHED
    ------  ---------  --------
    200809  N          OFF
    200902  N          ON
    200906  Y          ON
    200909  Y          ON
    The SQL of the view of this table /(entity object) object is:
    SELECT Terms.TERM
    FROM TERMS Terms
    WHERE AVAILABLE = 'Y' AND SWITCHED = 'ON'
    I can't drag the two selected lines of data control palette. But it's just a table. What I need is to ask the user to select one of them. What is the best way to achieve this?

    Thanks a lot for your help!

    Newman

    Hello

    Try this:

    a. at the bean of support within actionListener/action/selectionListener(based on your need), browse the rows that are returned by your query (best way is to write a method return results in AM/VO Impl list and then call him bean support) and prepare a list of the selectItems as below:

    //bean code
    private List selectItems;
    
    //setter and getter methods for selectItems
    
    actionListener/action/selectionListener(..){
       SelectItem selectItem = null;
       for(Row row: rows){
          selectItem = new SelectItem(,
    

    Finally link these list of selectItems tag of f: selectItems selectOneChoice list

    
        
    
    

    Jean Lou

  • How to create dynamically sorting table?

    For example, I have a table with 2 columns: 'Name', 'value x; and 1 table with columns 'name' value 'y' (which is based on the value of x + a formula). What I want to achieve is to get table2 sorted whenever I change value in table1. The "Filter/Sort" tool only applies sort once and doesn't react to any changes made to the table 1.

    I don't know how the practice is (I find it easier at the station just manually), but here's a way to generate an array sorted automatically.

    Add a column "index" for the value of Y in the same table (this can be hidden if you want) with a formula like this:

    The formula in C2, filled to the bottom:

    = B2 + 5 + LINE () / 10000

    The idea is to calculate Y using some formula that you use and then add a very small number based on the number of line so that it becomes a unique value that can be used for searches, even when the same value 'original' appears more than once.

    Then in column B of the table "Sorted" list the values for Y in Crescent order like this:

    The formula in B2, filled to the bottom:

    = SMALL (Table 1: $C, ROW (−1))

    And, finally, to get the name corresponding to this value of Y as this:

    The formula in A2, filled to the bottom:

    = INDEX (table 1: $A, MATCH (B2, table 1: $C, 0))

    Now, whenever you change a value in the column X, "Sorted" table is automatically sorts.

    SG

  • How to create dynamic links with player

    Can you create a hyperlink in the new free player?

    Thank you.

    I did ask on the old free player.

    I just discovered that urls are created to be dynamic links, so I'm good.

    Thanks for trying.

  • How to create vertical lines evenly spaced?

    Hello!

    I need to create a grid with also spaced columns and lines, so what I need basically is the ability to divide an image vertically in a certain number of measures, something similar to the input field "number of columns" for a text block.

    Currently my solution is to create a text frame, rotate 90 degrees and then apply the command "number of columns" to the desired vertical subdivisions number, I need (I liked this option cos' it provides a gutter between the lines). Is there something faster?

    1. Set up the column width on this page for the value you need for spacing.
    2. Draw a frame chassis/graphic rectangle/text and
    3. When you draw (do not release the mouse button) works with the arrow keys up and down.

    Or go to layout > create the guide lines and add your values and draw your rectangles between these guidelines.

  • Created dynamically lines close during registration and reopening of form

    I need help. The form below:

    1. When you click the green + button (left), additional follow-up action lines are created.
    2. But if you save the form, and then reopen, these lines are now gone, and they are replaced by other lines (lines updates) that are created by clicking the buttons on the far right + green. What I got wrong script that is causing this problem?

    https://Acrobat.com/#d=j2PX * sEkA6NV5wczGGOQ * has

    Hello

    Just had a look, and to start I would not use the same name for all these expandable lines (line 1).

    The script preserve changes is set to automatic, so it isn't that. The script is shot without error, so I think the problem is the naming convention and ensuring that ONLY the objects that are required to repeat are set to be repeated in the object > range of liaison.

    Niall

Maybe you are looking for