Create dynamic column from xml file

Hi All,
       <?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"  layout="absolute" backgroundColor="white" width="500" height="300" creationComplete="onload()" >
<mx:Style>
    DataGrid {
        alternatingItemColors: #a1a1a1,#8bb8e6;       
        borderColor:#050505; borderStyle:outset;        
        color:#ffffff;       
        editable:false;         
           fontSize:11; fontWeight:bold; fontFamily:Tahoma;          
           horizontalGridLines:false;
           headerStyleName:myHeaderStyles;
                headerSeparatorSkin:ClassReference("mx.skins.ProgrammaticSkin");    
    rollOverColor:#5CC2F7;    
    selectionColor:#E8C76D; sortableColumns:true;   
    textAlign:center; textRollOverColor:#FD0606; textSelectedColor:#1301FF;   
    variableRowHeight:true;
    verticalAlign:middle; verticalGridLines:false; verticalGridLineColor:#050505;   
wordWrap: false; 
.myHeaderStyles
            color: #ffffff;
            fontWeight: bold; fontFamily:Arial; fontSize:13;
</mx:Style>
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
   import mx.charts.renderers.CircleItemRenderer;
   import mx.charts.series.ColumnSeries;
   [Bindable]
    public var myData:ArrayCollection;
private var now:Date=new Date();
private var str:String;
private var st:String;
public function onload():void
str=String(now.getDate())+' '+String(now.getMonth())+' '+String(now.getFullYear())+' '+String(now.getHours())+' '+String(now.getMinutes()+' '+String(now.getSeconds()));
trace(str);
st=srv.url="Data/NumberChart.xml?rand="+str;
trace(st);
srv.send();
public function onresult():void
myData=ArrayCollection(srv.lastResult.Document.Record)
trace(myData);
]]>
</mx:Script>
<!-- xml path (data passing) -->
  <mx:HTTPService id="srv"         result="onresult()"  /> 
  <mx:WipeRight id="myWR" duration="2000"/>
    <mx:WipeLeft id="myWL" duration="2000"/>   
    <mx:HBox label="Home Team" width="100%" height="100%" backgroundColor="white">
<mx:DataGrid id="HomeTeam" dataProvider="{myData}" creationCompleteEffect ="{myWR}"   width="500" height="300"  headerBackgroundSkin="@Embed(source='assets/Tileimage4movieplayer_img.png')">
<mx:columns>
<mx:DataGridColumn id="Hcol1" headerText="Player" draggable="false" dataField="DisField" width="170" showDataTips="true" wordWrap="true"  />
<mx:DataGridColumn id="Hcol2" headerText="Average" draggable="false" dataField="Value" width="170" showDataTips="true" wordWrap="true"  />
<mx:DataGridColumn id="Hcol3" headerText="Matchs" draggable="false" dataField="Prefix" width="170" showDataTips="true" wordWrap="true"  />
</mx:columns>
</mx:DataGrid>
</mx:HBox>
</mx:Application>
and my xml code is...
<?xml version='1.0' encoding='utf-8' ?>
<Document Title='50 Runs Milestone'>
<Record>
<DisField>K Sangakkara</DisField>
<Value>200.00</Value>
<runs>50</runs>
<Prefix>KXIP Vs DC</Prefix>
</Record>
<Record>
<DisField>R Sharma</DisField>
<Value>185.19</Value>
<Prefix>KXIP Vs DC</Prefix>
<runs>50</runs>
</Record>
<Record>
<DisField>W Jaffer</DisField>
<Value>151.52</Value>
<Prefix>BRC Vs CSK</Prefix>
<runs>50</runs>
</Record>
<Record>
<DisField>G Gambhir</DisField>
<Value>135.14</Value>
<Prefix>CSK Vs DD</Prefix>
<runs>50</runs>
</Record>
<Record>
<DisField>M Boucher</DisField>
<Value>125.00</Value>
<Prefix>KKR Vs BRC</Prefix>
<runs>50</runs>
</Record>
<Record>
<DisField>A Gilchrist</DisField>
<Value>119.05</Value>
<Prefix>KXIP Vs DC</Prefix>
<runs>50</runs>
</Record>
<Record>
<DisField>S Asnodkar</DisField>
<Value>113.64</Value>
<Prefix>RR Vs BRC</Prefix>
<runs>50</runs>
</Record>
</Document>
it's working but i want to crete dynamic datagrid column how to do it any idea?

I actually found this topic interesting, so I made the data and code generic and created a Flex Cookbook entry, adding the ability to remove columns as well:
<?xml version='1.0' encoding='utf-8' ?>
<Document>
  <Record>
    <name>Bob Smith</name>
    <age>48</age>
    <sales>$53,000.00</sales>
    <territory>Southeast</territory>
  </Record>
  <Record>
    <name>Susan Sharma</name>
    <age>37</age>
    <sales>$37,000.00</sales>
    <territory>Southwest</territory>
  </Record>
  <Record>
    <name>George Freebird</name>
    <age>52</age>
    <sales>$49,000.00</sales>
    <territory>Midwest</territory>
  </Record>
</Document>
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
  creationComplete="srv.send();" >
  <mx:Script>
    <![CDATA[
      import mx.controls.Alert;
      import mx.collections.ArrayCollection;
      [Bindable] public var myData:ArrayCollection;
      public function onresult():void{
        myData=ArrayCollection(srv.lastResult.Document.Record)
      private function modifyColumns(evt:MouseEvent):void{
        var ac:ArrayCollection = new ArrayCollection(SalesData.columns);
        var actionTaken:Boolean = false;
        if(evt.currentTarget.label=="Remove Column"){
          for each(var col1:DataGridColumn in ac){
            if(col1.headerText == headerTxt.text){
              ac.removeItemAt(ac.getItemIndex(col1));
              headerTxt.text = "";
              SalesData.columns = ac.toArray();
              actionTaken = true;
          if(actionTaken){
            mx.controls.Alert.show("Column " + headerTxt.text + " was removed.");
          }else{
            mx.controls.Alert.show("Column " + headerTxt.text + " not found.");
        }else if(evt.currentTarget.label=="Add Column"){
          for each(var col:DataGridColumn in ac){
            if(col.headerText == headerTxt.text){
              mx.controls.Alert.show("Column " + headerTxt.text + " already exists.");
              return;
          var dgc:DataGridColumn = new DataGridColumn();
          dgc.headerText = headerTxt.text;
          dgc.dataField = datafieldTxt.text;
          dgc.width = 100;
          ac.addItemAt(dgc, int(columnIndexTxt.text));
          SalesData.columns = ac.toArray();
          headerTxt.text = "";
          datafieldTxt.text = "";
          columnIndexTxt.text = "";
          mx.controls.Alert.show("Column " + headerTxt.text + " was added.");
    ]]>
  </mx:Script>
  <mx:HTTPService id="srv" url="data.xml" result="onresult()"/> 
  <mx:DataGrid id="SalesData" dataProvider="{myData}" width="500" height="300">
    <mx:columns>
      <mx:DataGridColumn headerText="Name" dataField="name" width="170"/>
      <mx:DataGridColumn headerText="Sales" dataField="sales" width="170"/>
      <mx:DataGridColumn headerText="Territory" dataField="territory" width="170"/>
    </mx:columns>
  </mx:DataGrid>
  <mx:Form label="Add or Remove a Column">
    <mx:FormItem label="Enter column header text:">
      <mx:TextInput id="headerTxt"/>
    </mx:FormItem>
    <mx:FormItem label="Enter column datafield (if adding):">
      <mx:TextInput id="datafieldTxt"/>
    </mx:FormItem>
    <mx:FormItem label="Enter zero based new column index (if adding):">
      <mx:TextInput id="columnIndexTxt"/>
    </mx:FormItem>
    <mx:FormItem label="Click to add or remove column">
      <mx:HBox>
        <mx:Button label="Add Column" click="modifyColumns(event);"
          disabledColor="0xf1aa99"
          enabled="{headerTxt.text!=''&amp;&amp;datafieldTxt.text!=''&amp;&amp;columnIndexTxt.text! =''}"/>
        <mx:Button label="Remove Column" click="modifyColumns(event);"
          disabledColor="0xf1aa99" enabled="{headerTxt.text!=''}"/>
      </mx:HBox>
    </mx:FormItem>
  </mx:Form>
</mx:Application>

Similar Messages

  • How to create Inbound Idoc from XML file-Need help urgently

    Hi,
    can any one tell how to create inbound Idoc from XML file.
    we have xml file in application server Ex. /usr/INT/SMS/PAYTEXT.xml'  we want to generate inbound idoc from this file.we are successfully able to generate outbound XML file from outbound Idoc by using the XML port. But not able to generate idoc from XML file by using we19 or we16.
    Please let me know the process to trigger inbound Idoc with out using  XI and any other components.
    Thanks in advance
    Dora Reddy

    Hi .. Did either of you get a result on this?
    My question is the same really .. I am testing with WE19 and it seems SAP cannot accept an XML inbound file as standard.
    I see lots of mention of using a Function Module.
    Am I correct in saying therefore that ABAP development is required to create a program to run the FM and process the idoc?
    Or is there something tht can be done with Standard SAP?
    Thanks
    Lee

  • Dynamically create Value Objects from XML file

    Hi
    I want to create a value object from Xml file dynamically,like in the xml file i have the name of the variable and the datatype of the variable.is it possible do that,if so how.

    Read about apache's Digester tool. This is part of the Jakartha project. This tool helps in creating java objects from the XML files. I am not sure, if that is what u r looking for.

  • Create web pages from xml files using Servets or JSP

    I�m new in this tecnology and I have to create a web pages from information that I get from a XML files. I would like to know if there is a place where I can find examples of code or any book that could help me.

    Two places with loads of information on this:
    http://xml.apache.org
    Look at Xalan or Cocoon.
    Also, there was an article on http://www.javaworld.com on XML with JSP.

  • Create an UDO from XML file

    Hello,
    I would want to create an UDO from an XML file. But I don't see any documentation about it.
    Do you know if there is any sample or something?
    Thanks in advance

    Hi Martin,
    I don't know if this is possible as I looked at the properties of the UDO object (SAPbobsCOM.UserObjectsMD) and there are no XML methods. As with the other meta data objects, like UserTablesMD and UserFieldsMD you have SaveXML and GetAsXML, but not with UDO.
    Hope it helps,
    Adele

  • NEED HELP... Creating dynamic table from data file...

    Hi
    I'm writing an application for data visualization. The user can press the "open file" button and a FileChooser window will come up where the user can select any data file. I would like to take that data file and display it as a table with rows and columns. The user needs to be able to select the coliumns to create a graph. I have tried many ways to create a table, but nothing seems to work! Can anyone help me?! I just want to read from the data file and create a spreadsheet type table... I won't know how many rows and columns I'll need in advance, so the table needs to be dynamic!
    If you have ANY tips, I'd REALLY appreciated.....

    Thank you for your help. I tried to use some of the code in the examples... I'm really new at this, so I'm not sure how to set it up. I added the code, but when I open a file, nothing happens. Here's the code I have so far...
    package awt;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.text.*;
    import javax.swing.border.*;
    import javax.swing.table.*;
    * @author
    public class Main {
    public static void main(String[] args) {
    JFrame frame = new ScatterPlotApp();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.show();
    class ScatterPlotApp extends JFrame implements ActionListener{
    private JButton openButton, exitButton, scatButton, refreshButton;
    private JMenuBar menuBar;
    private JMenuItem openItem, exitItem;
    private JFileChooser chooser;
    private JMenu fileMenu;
    private JTextPane pane;
    private JTable table;
    private DefaultTableModel model;
    private JScrollPane scrollPane;
    private Container contentPane;
    /** Creates a new instance of ScatterPlotApp */
    public ScatterPlotApp() {
    setTitle("Data Visualizer");
    Toolkit tk = Toolkit.getDefaultToolkit();
    Dimension d = tk.getScreenSize();
    int width = 867;
    int height = 800;
    setBounds((d.width - width)/2, (d.height - height)/2, width, height);
    contentPane = getContentPane();
    JPanel panel = new JPanel();
    //pane = new JTextPane();
    panel.setLayout(new FlowLayout(FlowLayout.CENTER));
    contentPane.add(panel, BorderLayout.SOUTH);
    //contentPane.add(pane, BorderLayout.NORTH);
    scatButton = new JButton("Create ScatterPlot");
    scatButton.addActionListener(this);
    openButton= new JButton ("Open File");
    openButton.addActionListener(this);
    exitButton = new JButton ("Exit");
    exitButton.addActionListener(this);
    refreshButton = new JButton ("Reload Data");
    refreshButton.addActionListener(this);
    panel.add(openButton);
    panel.add(scatButton);
    panel.add(refreshButton);
    panel.add(exitButton);
    fileMenu = new JMenu("File");
    openItem = fileMenu.add(new JMenuItem ("Open", 'O'));
    openItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, Event.CTRL_MASK));
    openItem.addActionListener(this);
    exitItem = fileMenu.add(new JMenuItem ("Exit", 'X'));
    exitItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.CTRL_MASK));
    exitItem.addActionListener(this);
    JMenuBar menuBar = new JMenuBar();
    fileMenu.setMnemonic('F');
    menuBar.add(fileMenu);
    setJMenuBar(menuBar);
    public void actionPerformed(ActionEvent e){
    Vector columnNames = new Vector();
         Vector data = new Vector();
    try{
    Object source = e.getSource();
    if (source == openButton || e.getActionCommand().equals("Open")){
    chooser = new JFileChooser(".");
    int status =chooser.showOpenDialog(this);
    if (status ==JFileChooser.APPROVE_OPTION)
    File file = chooser.getSelectedFile();
    FileInputStream fin = new FileInputStream(file);
    BufferedReader br = new BufferedReader(new InputStreamReader(fin));
    String line;
    //StringBuffer bf = new StringBuffer();
    StringTokenizer st1 = new StringTokenizer(br.readLine(), ";");
                   while( st1.hasMoreTokens() )
                        columnNames.addElement(st1.nextToken());
                   // extract data
                   while ((line = br.readLine()) != null)
                        StringTokenizer st2 = new StringTokenizer(line, ";");
                        Vector row = new Vector();
                        while(st2.hasMoreTokens())
                             row.addElement(st2.nextToken());
                        data.addElement( row );
                   br.close();
    model = new DefaultTableModel(data, columnNames);
              table = new JTable(model);
    scrollPane = new JScrollPane( table );
    getContentPane().add( scrollPane, BorderLayout.NORTH );
    while((line=br.readLine())!=null)
    bf.append(line+"\n");
    pane.setText(bf.toString());
    //pane.setText(bf.toString());
    else if (source == scatButton){
    else if (source == exitButton || e.getActionCommand().equals("Exit")){
    System.exit(0);
    else if (source == refreshButton){
    catch (Exception ex){
    ex.printStackTrace();
    }

  • HELP:Loading XMLtype column from xml file using SQLLOADER

    Hi,
    My table structure is
    crtd_date date,
    xml_doc XMLType
    I have to insert the data dynamically from sqlloader,is it possible? - if it possible please help with controlfile.
    i wrote the controlfile like
    LOAD DATA
    INTO TABLE drvt_xml replace
    XMLType(xmldoc)
    FIELDS TERMINATED BY ',' optionally enclosed by '"'
    crtd_date SYSDATE,
    fname filler char,
    xmldoc lobfile(fname) terminated by eof
    )

    Hi,
    I am having the same issue wer u able to write the control file and did it work?
    If yes pls post ur control file.
    Thanks in advance!!

  • How to automatically create fillable PDFs from XML

    We are looking for a way to create fillable PDFs that users can enter data into and save (so the PDF needs Reader Rights applied) and we want to be able to automatically create these PDFs from XML files. We are able to do what we want in a manual fashion using Acrobat Pro v8 but we need a way to automate this due to the volume of XML files that we will need to convert.
    Is there any way that this can be scripted from a command line interface with Acrobat.. like:
    Acrobat.exe –input FileName.xml –output FileName.pdf –applyReaderRights true
    If there is no command line options for this is there any way that this could be coded using .NET or any other programming language?

    You cannot automate applying usage rights with Acrobat. For that you'd need to use Adobe's LiveCycle Reader Extensions.
    How exactly are you currently converting XML into fillable forms? Are you using an XDP to somehow convert to an XFA-based PDF?

  • Creating array from XML file

    Currently my application uses the following arrays to populate a map with data depending on the user's selection.
    <fx:Declarations>
    <fx:Array id="fwo1">
    <ammap:MapArea instanceName="borders" color="#FFFFFF" mouseEnabled="false"/>
    <ammap:MapArea instanceName="SE" title="SWEDEN" value="4447100" customData="{dpSE}"/>
    <ammap:MapArea instanceName="CH" title="SWITZERLAND" value="47100" customData="{dpCH}"/>
    <ammap:MapArea instanceName="FR" title="FRANCE" value="447100" customData="{dpFR}"/>
    </fx:Array>
    <fx:Array id="fwo2">
    <ammap:MapArea instanceName="borders" color="#FFFFFF" mouseEnabled="false"/>
    <ammap:MapArea instanceName="SE" title="SWEDEN" value="2000" customData="{dpSE}"/>
    <ammap:MapArea instanceName="CH" title="SWITZERLAND" value="200" customData="{dpCH}"/>
    <ammap:MapArea instanceName="FR" title="FRANCE" value="20" customData="{dpFR}"/>
    </fx:Array>
    </fx:Declarations>
    I would like to spin the country data off into one or more external XML files so that rather than being hard coded, the arrays would load the data dynamically.
    <fx:Array id="fwo1">
    <ammap:MapArea instanceName="borders" color="#FFFFFF" mouseEnabled="false"/>
    [[include/loop through data from XML file to create rest of array]]
    </fx:Array>
    <fx:Array id="fwo2">
    <ammap:MapArea instanceName="borders" color="#FFFFFF" mouseEnabled="false"/>
    [[include/loop through data from XML file here to create rest of array ]]
    </fx:Array>
    After much searching, I just haven't quite found an example that will let me make the leap from hard coding to dynamically loading the data (in large part, because of the name space declaration as part of the array element).
    Any suggestions would be greatly appreciated.  Thanks so much.

    Hi laurie brown,
    ////////////////////// XML /////////////////////
    <?xml version="1.0" encoding="iso-8859-1"?>
    <Data>
    <name>Raj</name>
    <name>Siva</name>
    <name>Babu</name>
    <name>Kiran</name>
    <name>Girish</name>
    </Data>
    ////////////////////// XML /////////////////////
    ////////////////////// As 3.0 /////////////////////
    package{
        import flash.display.MovieClip;
        import flash.net.URLLoader;
        import flash.net.URLRequest;
        import flash.events.Event;
        public class XMLDataPush extends MovieClip{
            var urlRequest:URLRequest = new URLRequest("data.xml");
            var urlLoader:URLLoader = new URLLoader();
            var dataArr:Array = new Array();
            public function XMLDataPush():void{
                urlLoader.load(urlRequest);
                urlLoader.addEventListener(Event.COMPLETE, onLoaded);
            private function onLoaded(evt:Event):void{
                var xml:XML = new XML(evt.target.data);
                for(var i:Number = 0; i<xml.children().length(); i++){
                    dataArr.push(xml.children()[i]);
                trace(dataArr + "  dataArr" );
    ////////////////////// As 3.0/////////////////////
    If it use for you please mark it correct answer.
    Thank you
    Siva

  • Create Business Partner from XMl String not a file

    Hi,
    Is it possible to create a BP from an XML string. 
    I know about GetBusinessPartnerFromXml(string FileName, int index)
    but I dont want to save the string in a file before creating a BP from it
    Hope there's a method to do that

    Marc,
    This looks like it is a duplicate of this post, so I am closing this thread as it looks like you answered your own question!
    Create Business Partner from XMl String not a file
    Eddy

  • Create controls dynamically based on XML file

    Hi All,
    I am very new to Flex environment. I am trying to integrate FLEX with ASP.net for better UI interfacing.
    May I know if is it possible to draw fields (Text boxes, option buttons, etc) on the Flex dynamically using a XML file at runtime.
    What my expectation is, if I have an XML file with the filed names and type, can the Flex draw them on the front end UI?
    Please  let me know your thoughts.
    Naveen

    Is there possible to have an portlet that can be enlarged?Yes. You can maximise a portlet
    And is there possible if I have a .php file, and then I want to create a portlet based on that .php fileNot directly.
    If you are going to run the PHP file in its own machine then you could use a browser or clipper portlet. If you want to run the PHP file on the JVM itself, I believe there are some commercial products that let you do this (then its equivalent to a JavaServlet). This could then be included by any dummy JSP and you could use a plain jsp portlet . however you wqould have to be careful how you generate links within the PHP file (because you'd have to mimic the way BEA tags behave) .
    never tried this and if you have few PHP pages then you could probably rewrite to java.

  • 1.6 Dynamic Photo Gallery - alt and title attributes from xml file?

    Hi!
    I would like to attach information to my gallery images from
    the XML-file used by the gallery.
    Especially the alt and title attributes for the "img
    id="mainImage"-tag would add a bit more user friendliness.
    I found
    this
    example about adding caption to images very help full and
    everything worked just fine, thanks to clear information!
    (http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=602&threadi d=1306782&enterthread=y)
    Could someone come up with an example of adding title/alt
    attributes values from XML file?
    I'm sure there are quite a few out ther who would like to see
    a solution to this ;)

    You need to add your info to the XML.
    So something like:
    <photo
    path = "travel_01.jpg"
    width = "263"
    height = "350"
    title="my title"
    alt_text="Alt Text"
    thumbpath = "travel_01.jpg"
    thumbwidth = "56"
    thumbheight = "75">
    </photo>
    Then in your detailregion:
    <img src="{dsData::large/@base}{@path}" alt="{@alt_text}
    title="{@title}" />
    I am using
    http://www.adobe.com/devnet/dreamweaver/articles/spry_photo_album.html
    as the source of my samples...
    So, just add the data to the XML and then you will have these
    attributes available as data references.
    Hope this helps.
    Don

  • Data Load from XML file to Oracle Table

    Hi,
    I am trying to load data from XML file to Oracle table using DBMS_XMLStore utility.I have performed the prerequisites like creating the directory from APPS user, grant read/write to directory, placing the data file on folder on apps tier, created a procedure ‘insertXML’ to load the data based on metalink note (Note ID: 396573.1 How to Insert XML by passing a file Instead of using Embedded XML). I am running the procedure thru below anonymous block  to insert the data in the table.
    Anonymous block
    declare
      begin
      insertXML('XMLDIR', 'results.xml', 'employee_results');
      end;
    I am getting below error after running the anonymous block.
    Error :     ORA-22288: file or LOB operation FILEOPEN failed”
    Cause :   The operation attempted on the file or LOB failed.
    Action:   See the next error message in the error stack for more detailed
               information.  Also, verify that the file or LOB exists and that
               the necessary privileges are set for the specified operation. If
               the error still persists, report the error to the DBA.
    I searched this error on metalink and found DOC ID 1556652.1 . I Ran the script provided in the document. PFA the script.
    Also, attaching a document that list down the steps that I have followed.
    Please check and let me know if I am missing something in the process. Please help to get this resolve.
    Regards,
    Sankalp

    Thanks Bashar for your prompt response.
    I ran the insert statement but encountered error,below are the error details. statement.
    Error report -
    SQL Error: ORA-22288: file or LOB operation FILEOPEN failed
    No such file or directory
    ORA-06512: at "SYS.XMLTYPE", line 296
    ORA-06512: at line 1
    22288. 00000 -  "file or LOB operation %s failed\n%s"
    *Cause:    The operation attempted on the file or LOB failed.
    *Action:   See the next error message in the error stack for more detailed
               information.  Also, verify that the file or LOB exists and that
               the necessary privileges are set for the specified operation. If
               the error still persists, report the error to the DBA.
    INSERT statement I ran
    INSERT INTO employee_results (USERNAME,FIRSTNAME,LASTNAME,STATUS)
        SELECT *
        FROM XMLTABLE('/Results/Users/User'
               PASSING XMLTYPE(BFILENAME('XMLDIR', 'results.xml'),
               NLS_CHARSET_ID('CHAR_CS'))
               COLUMNS USERNAME  NUMBER(4)    PATH 'USERNAME',
                       FIRSTNAME  VARCHAR2(10) PATH 'FIRSTNAME',
                       LASTNAME    NUMBER(7,2)  PATH 'LASTNAME',
                       STATUS  VARCHAR2(14) PATH 'STATUS'
    Regards,
    Sankalp

  • How to show records from xml file

    HI All
    I have created one region its actually search region
    which having 5 items and result table region
    I want to search records based on that 5 items and want to show output in table
    I have table name as hr_api_transactions which contains lot of columns
    and that table also contain one column
    name as TRANSACTION_DOCUMENT of type CLOB()
    that columns xml files for each record
    I want to extract data from that xml file and want to display.

    I have created one region on seeded page
    in that region I have created one table for output
    that region is search region
    which having 5 items of textfield and 2 items of type submit button
    GO and Clear
    I want to search based on that 5 items
    I want to display records in table that I have created on that region
    I have one seeded table
    that contain one column
    that column contain xml file for each individual records
    that xaml file contains values what I want to display
    MY problems are
    how can I extract data from xml file?
    how can I show all values for each records on that table?
    how can I search based on that 5 items?
    now I am able to find out single value from that XML file
    by using SQL command
    select xmltype(transaction_document).extract('//IrcPostingContentsVlEORow/CreationDate/text()').getStringVal() CreationDate
    from hr_api_transactions
    where transaction_ref_table = 'PER_ALL_VACANCIES'
    and transaction_ref_id = 4693;how can I extract more than one records from that XML file

  • Get repeated data from XML File

    Hello,
    I have created one SSIS package to fetch the data from XML file.[I have used XML Source in Data flow task]
    While doing the same i have used the "Generate XSD" option to generate XSD file automatically.
    XSD file is as follows -
      <xs:element name="Collage">
        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="0" name="Class" type="xs:string" />
            <xs:element minOccurs="0" name="Division" type="xs:string" />
            <xs:element minOccurs="0" name="CollageDetail">
              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" maxOccurs="unbounded" name="Studients">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element minOccurs="0" name="StudentID" type="xs:string" />
                        <xs:element minOccurs="0" name="StudentName" type="xs:string" />
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    My Table Information is as follows
    Class
    Devision
    StudentID
    StudentName
    BE
    A
    A101
    Tom
    BE
    A
    A102
    Jack
    BE
    A
    A103
    John
    Problem - In the "column" tab of the "XML source" i am not able to see the information of "class" and "Division". [these two columns data is repeating in every row
    I am able to see only two option in "Outout Name" Dropdown in "Column" Tab.i.e  "Studients" and "CollageDetail"
    Student is having two column [StudentID,StudentName] and CollageDetail is having only one column[CollageDetail_ID]
    I am not able to see "Collage","Division" Information XML Source.
    Could you please suggest me what i have make changes to get "Class","Division" information from "XML Source".
    Thank You. 

    Thanks for the reply,
    i tried add
    maxOccurs="unbounded" in the XSD file, I am able to see the Class and division option in
     "Outout Name" Dropdown.  but i am getting NULL value for the Class
    and division  column.
    Still i am not able to get top level attribute.Kindly suggest me for the same.
    XML file content is as follows.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Collage xmlns:ns0="http://www.W3.com/schema/Collage.xsd">
    <ns0:Class>BE</ns0:Class>
    <ns0:Division>A</ns0:Division>
    <ns0:CollageDetail>
    <ns0:Studients>
    <ns0:StudentID>A101</ns0:StudentID>
    <ns0:StudentName>Tom</ns0:StudentName>
    </ns0:Studients>
    <ns0:Studients>
    <ns0:StudentID>A102</ns0:StudentID>
    <ns0:StudentName>Jack</ns0:StudentName>
    </ns0:Studients>
    <ns0:Studients>
    <ns0:StudentID>A103</ns0:StudentID>
    <ns0:StudentName>John</ns0:StudentName>
    </ns0:Studients>
    </ns0:CollageDetail>
    </ns0:Collage>
    I would like to get all the XML data in below format [single set , not in part].Kindly suggest me for the same.
    Table data
    Class
    Devision
    StudentID
    StudentName
    BE
    A
    A101
    Tom
    BE
    A
    A102
    Jack
    BE
    A
    A103
    John

Maybe you are looking for