How to load movies from a xml file?

I have a movie called "index.swf" and a class called "index.as"
The problem is that loads the movies in the same position.
index.as:
package
    import flash.utils.getDefinitionByName;
    import flash.display.Loader;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.display.Loader;
    import flash.events.ProgressEvent;
    import flash.display.MovieClip;
    public class index extends Sprite
        private var _xml:XML;
        private var swf_id:String
        private var swf_m:String
        private var swf_x:Number
        private var swf_y:Number
        private var swf_width:Number
        private var swf_height:Number
function startLoad()
var mLoader:Loader = new Loader();
var mRequest:URLRequest = new URLRequest(swf_m);
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
mLoader.name=swf_id
mLoader.load(mRequest);
function onCompleteHandler(loadEvent:Event)
loadEvent.currentTarget.content.width=swf_width
loadEvent.currentTarget.content.height=swf_height
addChild(loadEvent.currentTarget.content);
function onProgressHandler(mProgress:ProgressEvent)
var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
trace(percent);
        public function index()
            loadXMLFile();
        private function loadXMLFile():void
            var loader= new URLLoader(new URLRequest("/configuracion.xml"));
            loader.addEventListener(Event.COMPLETE, loadedCompleteHandler);
        private function loadedCompleteHandler(e:Event):void
            e.target.removeEventListener(Event.COMPLETE, loadedCompleteHandler);
            _xml = XML(e.target.data);
            for each (var conf:XML in _xml.secciones.seccion) {
               swf_id = conf.id
                swf_m = conf.nombre;
                swf_x = conf.pos_x
                swf_y = conf.pos_y
                swf_width = conf.width
                swf_height = conf.height
                startLoad();
Xml File: "configuracion.xml"
<?xml version="1.0" encoding="utf-8"?>
<config>
  <secciones>
    <seccion>
      <id>1</id>
      <nombre>pelicula1.swf</nombre>
      <pos_x>20</pos_x>
      <pos_y>10</pos_y>
      <width>200</width>
      <height>200</height>
    </seccion>
    <seccion>
      <id>2</id>
      <nombre>pelicula2.swf</nombre>
      <pos_x>80</pos_x>
      <pos_y>10</pos_y>
      <width>200</width>
      <height>200</height>
    </seccion>
  </secciones>
</config>
thanks for your help...

thanks rziller
I already tried this,
x,y values work...
height and width values do not work.....
thanks but I fix the problem....
here this...
package
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.display.Loader;
   public class index extends Sprite
        private var _xml:XML;
        private var i:Number=0;
        private var Swf_List:Array = new Array();
        private var mLoader:Loader;
            function startLoad()
                 mLoader = new Loader();
                 var mRequest:URLRequest = new URLRequest(Swf_List[i][1]);
                 mLoader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
                 mLoader.load(mRequest);   
                 mLoader.name=Swf_List[i][0]
                 addChild(mLoader);
            function initHandler(event:Event):void {
                var ii:Number = event.target.loader.name-1
                event.target.loader.x=Swf_List[ii][2]
                event.target.loader.y=Swf_List[ii][3]
                event.target.loader.width=Swf_List[ii][4];       
                event.target.loader.height=Swf_List[ii][5];
                trace(event.target.loader.name)
            public function index()
            loadXMLFile();
            private function loadXMLFile():void
                var loader= new URLLoader(new URLRequest("config.xml"));
                loader.addEventListener(Event.COMPLETE, loadedCompleteHandler);
            private function loadedCompleteHandler(e:Event):void
                e.target.removeEventListener(Event.COMPLETE, loadedCompleteHandler);
                _xml = XML(e.target.data);
                _xml.ignoreWhitespace=true;
                    for each (var conf:XML in _xml.secciones.seccion)
                        Swf_List[i] = [conf.id,conf.nombre,conf.pos_x,conf.pos_y,conf.width,conf.height];
                        startLoad()
                        i++;
maybe not the best way....
but it works!!!.........

Similar Messages

  • Exception while loading properties from an xml file

    Hi all,
    I've got a problem while loading properties from an XML file:
    java.lang.ClassCastException: org.apache.xerces.dom.DeferredCommentImpl cannot be cast to org.w3c.dom.Element
    ERROR - Cannot load properties from the specified file <./conf/login.prop> java.lang.ClassCastException: org.apache.xerces.dom.DeferredCommentImpl cannot be cast to org.w3c.dom.Element
         at java.util.XMLUtils.importProperties(XMLUtils.java:97)
         at java.util.XMLUtils.load(XMLUtils.java:69)
         at java.util.Properties.loadFromXML(Properties.java:852)
         at g2.utility.HRPMProperties.<init>(HRPMProperties.java:78)
         at g2.utility.HRPMProperties.getInstance(HRPMProperties.java:94)
         at g2.gui.workers.ApplicationSwingWorker.<init>(ApplicationSwingWorker.java:36)
         at g2.main.Main.main(Main.java:37)but this code worked before, and I've got the xerces and xercesImpl packages in the classpath, anyone can give me an hint on how to fix the problem?

    Here there's the code that instantiates the HRPMProperties object loading the property file:
    public class HRPMProperties extends Properties {
         * A reference to myself.
        protected static HRPMProperties mySelf = null;
         * The property file to which load the configuration.
        protected static String propertyFile = "./conf/login.prop";
          * A set of static strings used as keys in the properties file.
         public final static String DATABASE_URL = "database_url";
         public final static String DATABASE_USERNAME = "database_username";
         public final static String DATABASE_PASSWORD = "database_password";
         public final static String REAL_USERNAME = "real_username";
         public final static String REAL_PASSWORD = "real_password";
         public final static String PHANTOM_LOGIN = "login_thru_phantom_user";
         public final static String AUTOCONNECT = "autoconnect";
         public final static String TRANSLATION_FILE = "translation_file";
         * Builds up an empty properties map.
        protected HRPMProperties(){
         super();
         this.reload();
         * Builds up the property map from the specified input file. <B> The file must be in XML format</B>.
         * In case of exception and/or problems reading from the specified file, an empty property map is returned.
         * @param fileName the path and the name of the file with the XML representation of the properties.
        protected HRPMProperties(String fileName){
         super();
         try{
             this.loadFromXML(new FileInputStream(fileName));        
         }catch(Exception e){
             Logger.error("Cannot load properties from the specified file <"+fileName+"> " + e);
             e.printStackTrace();
         * Provides an instance of the property class loaded from the default configuration file.
         * @return the property instance
        public static final HRPMProperties getInstance(){
         if( HRPMProperties.mySelf != null )
             return HRPMProperties.mySelf;
         else{
             HRPMProperties.mySelf = new HRPMProperties(HRPMProperties.propertyFile);
             return HRPMProperties.mySelf;
    }The constructor is the one triggering the exception, so there's a problem loading the XML property file.

  • How to load data from a  flat file which is there in the application server

    HI All,
              how to load data from a  flat file which is there in the application server..

    Hi,
    Firstly you will need to place the file(s) in the AL11 path. Then in your infopackage in "Extraction" tab you need to select "Application Server" option. Then you need to specify the path as well as the exact file you want to load by using the browsing button.
    If your file name keeps changing on a daily basis i.e. name_ddmmyyyy.csv, then in the Extraction tab you have the option to write an ABAP routine that generates the file name. Here you will need to append sy-datum to "name" and then append ".csv" to generate complete filename.
    Please let me know if this is helpful or if you need any more inputs.
    Thanks & Regards,
    Nishant Tatkar.

  • Step by Step details on how to load data from a flat file

    hi can anyone explain how to load data from a flat file. Pls giv me step by step details. thnx

    hi sonam.
    it is very easy to load data from flat file. whn compared with other extrations methods...
    here r the step to load transation data from a flat file.......
    step:1 create a Flat File.
    step:2 log on to sap bw (t.code : rsa1 or rsa13).
    and observe the flat file source system icon. i.e pc icon.
    step:3 create required info objects.
    3.1: create infoarea
         (infoObjects Under Modeling > infoObjects (root node)-> context menu -
    > create infoarea).
    3.2:  create char /keyfig infoObject Catalog.(select infoArea ---.context menu --->create infoObject catalog).
    3.3:   create char.. infoObj and keyFig infoObjects accourding to ur requirement and activate them.
    step:4 create infoSource for transaction data and create transfer structure and maintain communication structure...
        4.1: first create a application component.(select InfoSources Under modeling-->infosources<root node>>context menu-->create  applic...component)
       4.2: create infoSource  for transation data(select appl..comp--.context menu-->create infosource)
    >select O flexible update and give info source name..
    >continue..
    4.4: *IMp* ASSIGN DATASOURCE..
      (EXPAND APPLIC ..COMP..>EXPAND YOUR INFOSOURCE>CONTEXT MENU>ASSIGN DATASOURCE.)
    >* DATASOURCE *
    >O SOURCE SYSTEM: <BROWSE AND CHOOSE YOUR FLAT FILE SOURCE SYSTEM>.(EX:PC ICON).
    >CONTINUE.
    4.5: DEFINE DATASOURCE/TRANSFER STRUCTURE  FOR IN FOSOURCE..
    > SELECT TRANSFER STRUCTURE TAB.
    >FILL THE INFOOBJECT FILLED WITH THE NECESSARY  INFOOBJ IN THE ORDER OR SEQUENCE OF FLAT FILE STRUCTURE.
    4.6: ASSIGN TRANSFER RULES.
    ---> NOW SELECT TRANSFER RULES TAB. AND SELECT PROPOSE TRANSFER RULES SPINDLE LIKE ICON.
    (IF DATA TARGET IS ODS -
    INCLUDE 0RECORDMODE IN COMMUNICATION STRUCTURE.)
    --->ACTIVATE...
    STEP:5  CREATE DATATARGET.(INFOCUBE/ODS OBJECT).
    5.1: CREATE INFO CUBE.
    -->SELECT YOUR INFOAREA>CONTEXT MENU>CREATE INFOCUBE.
    5.2: CREATE INFOCUBE STRUCTURE.
    ---> FILL THE STRUCTURE PANE WILL REQUIRE INFOOBJECTS...(SELECT INFOSOURCE ICON>FIND UR INFOSOURCE >DOUBLE CLICK > SELECT "YES" FOR INFOOBJECT ASSIGNMENT ).
    >MAINTAIN ATLEAST  ON TIME CHAR.......(EX; 0CALDAY).
    5.3:DEFINE AND ASSIGN DIMENSIONS FOR YOUR CHARACTERISTICS..
    >ACTIVATE..
    STEP:6 CREATE UPDATE RULES FOR INFOCUDE USING INFOSOURCE .
    >SELECT UR INFOCUBE >CONTEXT MENU> CREATE UPDATE RULES.
    > DATASOURCE
    > O INFOSOURCE : _________(U R INFOSOURCE). AND PRESS ENTER KEY.......
    >ACTIVATE.....UR UPDATE RULES....
    >>>>SEE THE DATA FLOW <<<<<<<<----
    STEP:7  SCHEDULE / LOAD DATA..
    7.1 CREATE INFOPACKAGE.
    --->SELECT INFOSOURCE UNDER MODELING> EXPAND UR APPLIC.. COMP..> EXPAND UR INFOSOURCE..> SELECT UR DATASOURCE ASSIGN MENT ICON....>CONTEXT MENU> CREAE INFOPACKAGE..
    >GIVE INFOPACKAGE DISCREPTION............_________
    >SELECT YOUR DATA SOURCE.-------> AND PRESS CONTINUE .....
    >SELECT EXTERNAL DATA TAB...
    > SELECT *CLIENT WORKSTATION oR APPLI SERVER  >GIVE FILE NAME > FILE TYPE> DATA SAPARATER>
    >SELECT PROCESSING TAB
    > PSA AND THEN INTO DATATARGETS....
    >DATATARGET TAB.
    >O SELECT DATA TARGETS
    [ ] UPDATE DATATARGET CHECK BOX.....
    --->UPDATE TAB.
    O FULL UPDATE...
    >SCHEDULE TAB..
    >SELECT O START DATA LOAD IMMEDIATELY...
    AND SELECT  "START" BUTTON........
    >>>>>>>>>>
    STEP:8 MONITOR DATA
    > CHECK DATA IN PSA
    CHECK DATA IN DATA TARGETS.....
    >>>>>>>>>>> <<<<<<<<<----
    I HOPE THIS LL HELP YOU.....

  • Error loading data from an XML file using HTTPService

    Hello All,
    I have a runtime error that has got me beat at the moment   I am building an App in Flash Builder 4 to run on AIR.
    The error is as follows: TypeError: Error #1009: Cannot access a property or method of a null object reference.
    What i'm Trying to Do:
    I have 2 DropDownList controls, the first is populated with country names and the other with language options.  All the 1st DropDownList control does
    is set an image control to display the country flag and enable the 2nd DropDownList.
    The 2nd DropDownList sets the langCode variable equal to the chosen language code.  I then call the language function and pass it langCode.  Using this variable, I build up the string
    so that langFilePath will be equal to the XML file (which is "Lang_GBR.xml") location on my desktop and then call the HTTPService.
    As soon as the language function is called, the runtime error occurs and highlights the line with btn_LS_mainMenu.label = loadLangService.lastResult.Lang.GlobalTags.btnMenu;
    where I try to assign the button label with a new value from the XML file.
    I suspect this may be a trivial error but I just can't see it at the moment. 
    Any help or guidance would be appreciated.  Thanks
    Code:
    <fx:Script>
            <![CDATA[
                   [Bindable]
                   public var langFilePath:String;
                   public var langDir:File = File.desktopDirectory;
                   public var langCode:String;
                   public function countrySelect_changeHandler(event:IndexChangeEvent):void
                        switch (countrySelect.selectedItem)
                             case ('United Kingdom'): 
                                  trace("Item Selected was: "+ countrySelect.selectedItem);
                                  img_countryFlag.source = AngolaFlag;
                             break;
                             case ('France'): 
                                   trace("Item Selected was: "+ countrySelect.selectedItem);
                                   img_countryFlag.source = AustraliaFlag;
                             break;
                             default: 
                             break;
                        langSelect.enabled = true;
                        trace("1st dropdownbox");
                   public function langSelect_changeHandler(event:IndexChangeEvent):void
                        switch (langSelect.selectedItem)
                             case ('English'): 
                                 trace("Language Selected was: "+ langSelect.selectedItem);
                                 langCode = "Lang_GBR"; 
                             break;
                             case ('French'): 
                                 trace("Language Selected was: "+ langSelect.selectedItem);
                                 langCode = "Lang_FRA"; 
                             break;
                        language(langCode);
                   public function language(aParam:String):void
                        trace("Code Was: " + aParam);
                        trace("Lang dir: " + langDir.nativePath);
                        langFilePath = langDir.nativePath + "/" + aParam + ".xml";
                        trace("File to load: " + langFilePath);
                        trace("loadLangFile.url: " + loadLangService.url);
                        loadLangService.send();
                        btn_LS_mainMenu.label = loadLangService.lastResult.Lang.GlobalTags.btnMenu;
              ]]>
    </fx:Script>
    <fx:Declarations>
         <s:HTTPService id="loadLangService" url="{langFilePath}"/>
    </fx:Declarations>
    <s:DropDownList x="10" y="201" id="countrySelect" prompt="Please Select Your Country" width="274" enabled="true" change="countrySelect_changeHandler(event)">
    <s:DropDownList x="10" y="348" id="langSelect" prompt="Please Select Your Language" width="274" enabled="false" change="langSelect_changeHandler(event)">

    Don't sure about your XML structure, but for now i see the problem here between this 2 lines of code:
    loadLangService.send();
    btn_LS_mainMenu.label = loadLangService.lastResult.Lang.GlobalTags.btnMenu;
    Think data that your httpService should receive just can't go so fast to populate the lastResult before you call it in the next line
    Try adding a result listener to your service before you send it:
    loadLangService.addEventListener(ResultEvent.RESULT, handler);
    loadLangService.send();
    function handler(event:ResultEvent):void {
         btn_LS_mainMenu.label = loadLangService.lastResult.Lang.GlobalTags.btnMenu;

  • How to load variables from a .txt file

    Hi.
    I usually make a flash aplication in colaboration with a php
    programmer. But i want to test my swfs without having to wait for
    him. So i want to do that through a text file. I know that flash
    can load variables from text files. The problem is i don't know how
    to format the text file ( example.txt).
    Thank you

    Here's a couple of ideas.
    First you probably want to change what you have...and put
    your 'if (pVar==1' etc inside a separate function and call it from
    the onLoad handler after you have assigned the value to pVar...
    because the onLoad will run at some unknown point in time after
    loading has finished (actually in the test environment this might
    work... but that wouldn't be the same as what happens in a
    production setting).
    To create test files for loadvars... simply create a new as2
    file and put this code on the first frame and test movie:

  • How to Insert data from an XML file into an Oracle 10g table

    Hello,
    Please can you help me as I have hit a brick wall with this problem.
    We are running version 10g Oracle and we will start receiving XML files with employee data that needs loading into a table, this is the XML file:
    <?xml version="1.0"?>
    <RECRUITS>
    <RECRUIT>
    <FIRST_NAME>Gordon</FIRST_NAME>
    <LAST_NAME>Brown</LAST_NAME>
    <SHORT_NAME>GORDONBROWN</SHORT_NAME>
    <APP_NO>00002</APP_NO>
    <STATUS>M</STATUS>
    <DATE_FROM>21-JUL-2006</DATE_FROM>
    <RESOURCE_TYPE>P</RESOURCE_TYPE>
    <TITLE>Mr</TITLE>
    <DATE_OF_BIRTH>28-DEC-1983</DATE_OF_BIRTH>
    <SOCIAL_SEC>AB128456A</SOCIAL_SEC>
    <PARTTIME_PCT>1</PARTTIME_PCT>
    <SEX>M</SEX>
    <ADDRESS_TYPE>1</ADDRESS_TYPE>
    <ADDRESS>A HOUSE SOMEWHERE HERE</ADDRESS>
    <ZIP_CODE>PE3 LLL</ZIP_CODE>
    <PLACE>BOROUGH</PLACE>
    <COUNTRY_CODE>UK</COUNTRY_CODE>
    <PROVINCE>UK</PROVINCE>
    <EMAIL>[email protected]</EMAIL>
    </RECRUIT>
    (FYI - there may be more than 1 employee in each file so all of the above will be repeated X amount of times)
    </RECRUITS>
    To make things simple we have created a table which mirrors the XML file completely to load the data into, the SQL i have used is thus:
    CREATE TABLE RECRUITMENT
    FIRST_NAME VARCHAR2(30),
    LAST_NAME VARCHAR2(30),
    SHORT_NAME VARCHAR2(30),
    APP_NO NUMBER,
    STATUS VARCHAR2(1),
    DATE_FROM DATE,
    RESOURCE_TYPE VARCHAR2(1),
    TITLE VARCHAR2(4),
    DATE_OF_BIRTH DATE,
    SOCIAL_SEC VARCHAR2(9),
    PARTTIME_PCT NUMBER,
    SEX VARCHAR2(1),
    ADDRESS_TYPE VARCHAR2(1),
    ADDRESS VARCHAR2(30),
    ZIP_CODE VARCHAR2(8),
    PLACE VARCHAR2(10),
    PROVINCE VARCHAR2(3),
    EMAIL VARCHAR2(20)
    Every method we try from the numerous documents and so called "user guides" have failed, please can somebody show me the PL/SQL i need to get this files data into the above table?
    We need to be able to do this purely through SQL*PLUS as we hope - if we ever get it working manually to create a procuedure that will encapsulate everything so it can be run over and over again.
    The XML file is sitting in the XMLDIR and is called REC.XML.
    Please help : (

    Hi, I have got some material for inserting data into oracle table from xml file, this might help you.
    Create XML Document Table
    create table XML_DOCUMENT_TABLE
    FILENAME varchar2(64),
    XML_DOCUMENT XMLTYPE
    (This will be as per your record details).
    Inserting record to Oracle Table
    declare
    XML_TEXT CLOB := '<smsnotification>
                   <messageid> 256427844 </messageid>
              <protocolid> CO0NPS2KHQ </protocolid>
              <notifiedon> 1156123007416 </notifiedon>
              <status> 3PBI: Invalid </status>
    <additionalinfo> Customer account not active </additionalinfo>
    <carrierid> 1175 </carrierid>
    </smsnotification>';
    begin
    insert into XML_DOCUMENT_TABLE values ('Receipt.xml',XMLTYPE(XML_TEXT));
    end;
    Select Statement
    select extractValue(XML_DOCUMENT,'/smsnotification/messageid') Messageid,
    extractValue(XML_DOCUMENT,'/smsnotification/status') Status,
    extractValue(XML_DOCUMENT,'/smsnotification/carrierid') CarrierID
    from XML_DOCUMENT_TABLE;

  • How to load data from MS Excel file

    Hello All,
    Please help me regarding:
    how to load data/ insert records from MS Excel spreadsheet into Oracle table without converting that MS Excel file into CSV.
    Thank You in advance.

    Vivek More wrote:
    how to load data/ insert records from MS Excel spreadsheet into Oracle table without converting that MS Excel file into CSV.Setup HS connectivity:
    1. Create ODBC SYSTEM DSN using Microsift Excel driver(xls) and select your excel file as workbook.
    2. Create file initXLS.ora in %ORACLE_HOME%\hs\admin directory contailing the following line:
    HS_FDS_CONNECT_INFO = XLS3. Modify listener.ora file in %ORACLE_HOME%\network\admin directory and add the following lines to SID_LIST under SID_LIST_LISTENER
        (SID_DESC =
          (SID_NAME = XLS)
          (ORACLE_HOME = your-oracle-home)
          (PROGRAM = hsodbc)
        )4. Modify tnsnames.ora file in %ORACLE_HOME%\network\admin directory and add the following lines:
    XLS =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        (CONNECT_DATA =
          (SID = XLS)
        (HS=OK)
      )5. Restart listener.
    6. Create database link (public or private depending on your needs):
    CREATE PUBLIC DATABASE LINK XLS USING 'XLS';7. Now you are all set. For example my file has:
    NAME
    SAM
    JOEDefault sheet name "Sheet1$" is treated as table name (Since excel is case sensitive you need to use quoted name). First row is treated as column name. And select:
    SQL> select * from "Sheet1$"@xls;
    NAME
    SAM
    JOE
    SQL> Now if you do not know excel sheet names you can issue (I renamed excel sheet Sheet1$ to Names$):
    SQL> select table_name from all_tables@xls;
    TABLE_NAME
    Names$
    Sheet2$
    Sheet3$
    SQL> select column_name from all_tab_columns@xls where table_name = 'Names$';
    COLUMN_NAME
    NAME
    SQL> SY.

  • Loading data from a XML file to table

    Hi,
    i am using OWB 10g R2.i have to load one XML file to table.
    Can anyone help me in this regard.
    Thanks,
    Priya

    Hi Priya
    There is a post on leveraging XDB with some interesting details;
    http://blogs.oracle.com/warehousebuilder/2007/09/leveraging_xdb.html
    Cheers
    David

  • How to load data from a flat file to two different tables at a time.

    I am not aware of Sql Loader so Please any body suggest me that is there any way to load data from excel sheet to two different tables at a time its very urgent.
    with regards,
    Srinivas.R

    Read Utilities Guide from the Oracle Documentation Library. See
    <br>
    Oracle Database FAQs
    </br>

  • How to insert rows from an  xml file to a table

    im Using Oracle 11g It is showing below error when i execute..
    declare
    charString varchar2(80);
    finalStr varchar2(400) := null;
    rowsp integer;
    v_FileHandle UTL_FILE.FILE_TYPE;
    begin
    -- the name of the table as specified in our DTD
    xmlgen.setRowsetTag('Zipcodes');
    -- the name of the data set as specified in our DTD
    xmlgen.setRowTag('mappings');
    -- for getting the output on the screen
    dbms_output.enable(100000);
    -- open the XML document in read only mode
    v_FileHandle := utl_file.fopen(TMP_DIR1,'XML_NEW_CITIES.XML', 'r');
    loop
    BEGIN
    utl_file.get_line(v_FileHandle, charString);
    exception
    when no_data_found then
    utl_file.fclose(v_FileHandle);
    exit;
    END;
    dbms_output.put_line(charString);
    if finalStr is not null then
    finalStr := finalStr || charString;
    else
    finalStr := charString;
    end if;
    end loop;
    -- for inserting the XML data into the table
    rowsp := xmlgen.insertXML('SYS.ZIPCODES',finalStr);
    dbms_output.put_line('INSERT DONE '||TO_CHAR(rowsp));
    xmlgen.resetOptions;
    end;
    XML_NEW_CITIES.XML is
    <?xml version = '1.0'?>
    <Zipcodes>
    <mappings Record="4">
    <STATE_ABBREVIATION>CA</STATE_ABBREVIATION>
    <ZIPCODE>94301</ZIPCODE>
    <CITY>Palo Alto</CITY>
    </mappings>
    <mappings Record="5">
    <STATE_ABBREVIATION>CO</STATE_ABBREVIATION>
    <ZIPCODE>80323</ZIPCODE>
    <ZIP_CODE_EXTN>9277</ZIP_CODE_EXTN>
    <CITY>Boulder</CITY>
    </mappings>
    </Zipcodes>
    Error report:
    ORA-06550: line 8, column 3:
    PLS-00201: identifier 'XMLGEN.SETROWSETTAG' must be declared
    ORA-06550: line 8, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 10, column 3:
    PLS-00201: identifier 'XMLGEN.SETROWTAG' must be declared
    ORA-06550: line 10, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 14, column 34:
    PLS-00201: identifier 'TMP_DIR1' must be declared
    ORA-06550: line 14, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 31, column 12:
    PLS-00201: identifier 'XMLGEN.INSERTXML' must be declared
    ORA-06550: line 31, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 33, column 3:
    PLS-00201: identifier 'XMLGEN.RESETOPTIONS' must be declared
    ORA-06550: line 33, column 3:
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error
    Edited by: 898235 on Nov 20, 2011 11:02 PM

    OK, then did you try the XMLTable example, or are you waiting for someone to write it all down for you? :)
    You first have to create an Oracle directory object pointing to the physical location of your file (must be somewhere on the db server or at least a location the db server can access on the network).
    Then create the procedure, in this case a simple INSERT SELECT :
    SQL> create directory tmp_dir as 'c:\temp';
    Directory created
    SQL> create table zipcodes (
      2   state_abbreviation  varchar2(2),
      3   zipcode             varchar2(5),
      4   zip_code_extn       varchar2(10),
      5   city                varchar2(80)
      6  );
    Table created
    SQL> CREATE OR REPLACE PROCEDURE insertZipcodes (
      2    p_directory IN VARCHAR2
      3  , p_filename  IN VARCHAR2
      4  )
      5  IS
      6  BEGIN
      7 
      8    INSERT INTO zipcodes (state_abbreviation, zipcode, zip_code_extn, city)
      9    SELECT state_abbreviation
    10         , zipcode
    11         , zip_code_extn
    12         , city
    13    FROM XMLTable('/Zipcodes/mappings'
    14           passing xmltype(bfilename(p_directory, p_filename), nls_charset_id('AL32UTF8'))
    15           columns state_abbreviation varchar2(2)  path 'STATE_ABBREVIATION'
    16                 , zipcode            varchar2(5)  path 'ZIPCODE'
    17                 , zip_code_extn      varchar2(10) path 'ZIP_CODE_EXTN'
    18                 , city               varchar2(80) path 'CITY'
    19         )
    20    ;
    21 
    22  END;
    23  /
    Procedure created
    SQL> exec insertZipcodes('TMP_DIR', 'xml_new_cities.xml');
    PL/SQL procedure successfully completed
    SQL> commit;
    Commit complete
    SQL> select * from zipcodes;
    STATE_ABBREVIATION ZIPCODE ZIP_CODE_EXTN CITY
    CA                 94301                 Palo Alto
    CO                 80323   9277          Boulder

  • How To Load Sound From Inside jar File?

    Hello There
    i've made a jar file that contains Images&Pictures But I Can't Use Them
    So I Used For Loading Images
      URL url = this.getClass().getResource("image.jpg");
             setIconImage(new ImageIcon(url).getImage());and for loading sound when i use
      URL url = this.getClass().getResource("Bond2.wav");         
           AudioInputStream stream = AudioSystem.getAudioInputStream(new File(url));there's an error That The file Constructor doesn't take url
    how can i fix it?

    First_knight wrote:
    and for loading sound when i use
      URL url = this.getClass().getResource("Bond2.wav");         
    AudioInputStream stream = AudioSystem.getAudioInputStream(new File(url));there's an error That The file Constructor doesn't take url
    how can i fix it?Remove the "new File()". There is a getAudioInputStream() method that takes a URL.
    AudioInputStream in = AudioSystem.getAudioInputStream(url);

  • Loading JEditorPane from an XML file parsed by

    an XSL translator.
    the JEditorPane setPage needs a URL, I'm wondering if there is anyway way to have the XSL tool write directly to the JEditorPane?

    If the XSL translator is producing HTML, and it can be run at the command line and send its output to stdout (as many of them can), then there's an approach to a solution.
    JEditorPane has a read() method that takes an InputStream as a parameter. You could use Runtime.getRuntime().exec() to run the XSL translator, then use getInputStream() from the resulting Process object to capture its output, and give that InputStream to JEditorPane.read().
    That's an outline of what I would try. Runtime.exec() is a notoriously irritating thing to get working, so it might fail, but you could give it a try.

  • Loading an xml file from an xml file

    I'm trying to load an xml file from an xml file, but I'm
    having problems. My first xml file is really simple - it only
    contains one attribute with the name of another xml file in it
    (eventually I will have multiple xml files in here and run a loop
    on them...this is why I want to load an xml file from an xml file).
    Currently, with the code below, I can get the main xml file
    to load ("main.xml"), but I cannot get the secondary xml files to
    load FROM the main.xml.
    I want to then take childNode values from the secondary xml
    file and use them within my .swf in text boxes and whatnot.
    Any guidance? I think I'm going wrong on the line where I'm
    saying "i.newxml.load(i.attributes.location);"
    - How can I get this to work?

    johnypeter:
    I tried changing the code inside the loop to use just
    "newxml" instead of "i.newxml", and I declared with "var newxml =
    new XML();" - was this what you were thinking?
    kglad:
    The reason I tried to use the loadXML() function in the loop
    was so that for each node in my "main.xml" it would load the new
    xml file listed - this is a no-no? Do you have any ideas as to what
    I could do?
    For the for-loop, what should I change in it? I'm not great
    with loops so I tried to modify some code from another loop I found
    in another forum thread - not the right way to do it here?
    Also, what should I trace? The value of the _root.address, or
    i.attributes.location? I have created dynamic text boxes on my
    stage to see if the correct value from the xml file loads (ie. the
    name of the xml file within the xml file) and it does, but now I
    don't know how to put that information into ANOTHER loadXML()
    function and get the node information from it - does that make
    sense???
    Below are the examples of the xml files I am using. In the
    first one, main.xml, I will have a list of multiple xml files, each
    with the same nodes and elements as in the details.xml file
    (different values, of course).
    This is just to give you an example of what I'm trying to
    accomplish - pulling ALL the addresses and phone numbers from
    multiple xml files. I cannot manually collect this information, as
    it is dynamic, and will be updated in each individual details.xml.
    I was hoping to collect the information by simply adding to and
    updating ONE xml file - main.xml.
    Do you think this can be done? Am I going about it the wrong
    way? I'm quite limited in AS knowledge, which is why I'm piecing
    together code from other posts!

  • How to read configuration data from an xml file (not web.xml)?

    Hi,
    I want to separate the application specific configuration parameters in a separate xml file and read them as and when they are needed? I know that I can use the wb.xml but I want to separate them in a different xml file because I don't want the web.xml file to be played around later after deployment. If any change is needed then it should be done in the application-config.xml.
    How can I read the parameters from this xml file in my jsp code and also what should be the location of this file if I have
    ../webapps/Root/application
    directoty structure ?
    Any help is greatly appreciated.

    can you give an example of a property file and also
    it is loaded in the jsp ?Hmm... loading properties in a JSP is not a very good idea. You should do it in a separate class, rather than mixing the logic with the display logic.
    Properties properties = new Properties();
    properties.load(UtilClass.class.getResourceAsStream("config.properties"));
    // Add a try - catch block around the load
    // for IOException...

Maybe you are looking for

  • Problems with deploy on OC4J 10.1.3.2 with hibernate persistence.xml

    Hi all, I can't deploy an EAR/WAR into oc4j 10.3.2.0 stand-alone, I have the following error message : 2008-03-26 19:50:38.721 NOTIFICATION Binding opsky-webapp-1.0-SNAPSHOT web-module for application opsky to site default-web-site under context root

  • My Ipad Screen is Blurry

    I dropped my ipad on a carpeted floor, (in my case) and it wouldn't turn on and had a black screen.  I saw the "spanking"  post, I did it and low and behold it worked. When I turned my ipad on, the scree colors were messed up. Blue dots keep popping

  • Understandng the callable object within GP

    Hi All, I have basic question on callable objects in GP. I would like to know how the Adobe form content gets persisted with in GP . Example : We have 4 steps in a GP process , one requestor and two approvers. Each step is a webDynpro callable object

  • Wi-Fi not working with WRT54G

    Once in a while it works , but most of the time it doesn't. Safary can not find server. We have 2 iPhones , and both are the same. I just updagted the latest firmware on my router ( 4.21.1 ) . I have wireless securety disabled , SSID broadcast on ,an

  • Problems moving Time Machine drive from USB to Airport Extreme

    Greetings compadres. I'm using a WD external Mac hard drive for my Time Machine backups. I was using a USB hub and directly connecting my MacBook to the hub, thus a seamless connection to the external hard drive. Now, I want to connect my external dr