Loading XML data and images to init

I have this little flash application that I'm working, which loads images and XML data. It comes from the Timer class that loads the video clips from the scene and delete them (I thought that this could be the best way to orchestrate it it). Now, I'm having a problem with redundancy expenses. (It loads every time data, which causes delays, and so it was established (loaded) at the beginning and reused through the application)

Instead of loading the data each time, I would like to

(1) load the images and XML to load (with the initial start of the SWF)

(2) assign this data to variables and then add them and remove them as I please throughout the application.

I posted the code here http://CodeViewer.org/view/code:9BA

just to save space

With respect to the processing of XML, you have several options. I prefer to write classes that will treat this kind of functionality, but since you do things on the timeline, one way would be:

1. on the chronology of racquets_mc and listing_mc create a method that will affect the XML value:


function set loadedXML(xml:XML):void{
     xmlData = xml;
} 

2. on the main timeline, you will need to load your XML file only once how you load it into each individual symbol. Once it's loaded, you can pass it on to all of the objects that need to consume. For example, your XML instance on the main timeline setting is:

var configXML:XML;

After load you it, you can pass to your symbols and, thus, reuse in the expanses of the functions which instantiate the:

racquets_mc = new listing();racquets_mc.loadedXML = configXML;

listing_mc = new listing();listing_mc.loadedXML = configXML;

Naturally the routine of initiation within your symbols, in part, depend on presence of XML if you refactor your code accordingly.

I hope this helps.

Tags: Adobe Animate

Similar Questions

  • Best approach for the transmission of data and images

    We you write an app that will allow the user to take a picture of a document and enter a few bits of information about the document and then send it to our server. It is a mobile extension to a larger system of document management to back office we develop in-house so the intention of this BB app is not not to distribute to the masses.

    What is the most practical approach to transmit data and images captured on our server?

    -FTP - fooled with it some and a pain

    -WebService - did not attempt

    -Send an email with the picture attached - seems to work very well

    Is there another approach, should I consider?

    If you do not already things that communicates to the Server backend, e-mail is probably the easiest way.  Crosses all the issues of the segmentation of the image that you would have to do with the Web Service or FTP.

  • Dynamic PDF up to 200 images, the size of the pdf is greater, cannot save the data and images to the form

    Hi all

    My client would like to dynamic images up to 200 photos to my forms. It works very well. However, when I add images up to 35 images. I could not add images to shape more. Then I save data on the form. All the images and the data entered on the form are missing. I don't know why.

    If I add only 10 images - I can record data and images on the form. 15456 KB is the size of the pdf.  I was unable to add more photos or data on the form.

    There may be a problem the size of the pdf? How big can make a limited dynamic pdf?

    Can save us the information and images as much as we want?

    I spent two weeks to work and trying to figure out this problem. However, it is not successful.

    Help, please

    Cindy

    You must ensure that your users do not import large images.

    Therefore, you can use a script on the change event of an image field that checks the size of the data and warns the user if the file is too large.

    function formatNumber(number) {
        var num = number + '',
        x = num.split('.'),
        x1 = x[0],
        x2 = x.length > 1 ? '.' + x[1] : '',
        rgx = /(\d+)(\d{3})/;
        while (rgx.test(x1)) {
            x1 = x1.replace(rgx, '$1' + ',' + '$2');
        }
        return x1 + x2 + "KB";
    }
    
    var sizeLimit = 200, //allow upto 200KB images
      thisSize = Math.round((this.value.oneOfChild.value.length * 3 / 4) / 1024);
    
    if (sizeLimit > 0) {
      if (thisSize > sizeLimit) {
      xfa.host.messageBox("Note: With " + formatNumber(thisSize) + " the size of the imported image is greater that the recommended maximum of " + formatNumber(sizeLimit) + ".\nLarge images can cause a insufficent performance.\n\nIf possible, use images with the following recommended specs:\nFormat:\t\tPNG or JPG\nColor depth:\t8 Bit (higher is not supported)\nColor space:\tRGB (CMYK is not supported)\nFile Size:\t\t" + formatNumber(sizeLimit), "Recommended image size exceeded", 3, 0);
      }
    }
    
  • Loading XML data in ListView of C++ after extraction of http data

    I'm sorry did searh but could not find any refrence related to my problem
    I am trying to load the xml data returned from a web service HTTP Post QNetworkRequest and QNetworkReply in c ++.

    My XML that gets donwloaded is as

    
     http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://tempuri.org/">
      
        tu7652
        F
        Marry
        Wijaya
      
      
        23
        F
        Marry
        Wijaya
      
    
    

    In My QML, it comes to the ListView can say SearchResult.qml

    ListView {
              objectName: "resultlist"
              dataModel: feedsdatamodel
              listItemComponents: [
                ListItemComponent {
                            type: "item"
                            PeopleListItem {
                                name: ListItemData.givenName + ", " + ListItemData.sn
                                role: ListItemData.ExtFunction
                                leftPaddingText: 40
                            }
                        }
               ]
            }
     attachedObjects: [
           // The data model that contains the content of a XML file
            GroupDataModel {
                id: feedsDataModel
                sortingKeys: [
                    "givenName"
                ]
                grouping: ItemGrouping.None
            }
        ]
    

    PeopleListItem.qml

    import bb.cascades 1.0
    
    Container {
        property alias name: titleLabel.text
        property alias role: functionLabel.text
        property alias leftPaddingText: textcontainer.leftPadding
    
        layout: StackLayout {
            orientation: LayoutOrientation.TopToBottom
        }
        preferredWidth: 768
        preferredHeight: 135
        Container {
    
            id: textcontainer
            topPadding: 10
    
            layout: StackLayout {
                orientation: LayoutOrientation.TopToBottom
            }
            Label {
    
                id: titleLabel
                textStyle.base: SystemDefaults.TextStyles.TitleText
                textStyle.color: Color.Black
            }
            Label {
                id: functionLabel
                textStyle.base: SystemDefaults.TextStyles.BodyText
                textStyle.color: Color.Gray
            }
        }
        Divider {
            verticalAlignment: VerticalAlignment.Bottom
        }
    }
    

    This is the function I'm using to display the QML it is called from main.qml and works correctly.

    void PeopleFinder::onSearchClicked() {
        qDebug() << "PeopleFinder::PeopleFinder::onSearchClicked::\t" << "begin";
        qDebug() << "PeopleFinder::PeopleFinder::onSearchClicked::\tfname:"
                << m_fname << "\tlname:" << m_lname;
    
        // Create a network access manager and connect a custom slot to its
        // finished signal
        mNetworkAccessManager = new QNetworkAccessManager(this);
    
        // create a data model with sorting keys for lastname and firstname
        Q_ASSERT(
                connect(mNetworkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(requestFinished(QNetworkReply*))));
    
        //Load the bew QML file of Search from here
        QmlDocument *qml = QmlDocument::create("asset:///SearchResults.qml").parent(
                this);
        qml->setContextProperty("peoplefinder", this);
    
        Page *mypage = qml->createRootObject();
        qml->setParent(mypage);
        qDebug() << "PeopleFinder::PeopleFinder::onSearchClicked::\t s444444";
    
        // Retrieve the activity indicator from QML so that we can start
        // and stop it from C++
    //  mActivityIndicator = mypage->findChild("myIndicator");
    
        // Retrieve the list so we can set the data model on it once
        // we retrieve it
        mListView = mypage->findChild("resultlist");
    
        mNavigator->push(mypage);
    }
    

    Once the page loads in the QML it call the launch request providing c ++ file and once the
    query is completed under function is called with the data. I checked that data are downloaded properly

    void PeopleFinder::requestFinished(QNetworkReply* reply) {
        qDebug() << "PeopleFinder::PeopleFinder::requestFinished::\t"
                << "response received";
        // Check the network reply for errors
        if (reply->error() == QNetworkReply::NoError) {
    
            // Open the file and print an error if the file cannot be opened
            qDebug() << "PeopleFinder::PeopleFinder::requestFinished::\t"
                    << "No error";
    
            // Write to the file using the reply data and close the file
            QByteArray xml = reply->readAll();
            qDebug() << "Data: \n" << xml;
    
            // load the xml data
            XmlDataAccess xda;
            QVariant list = xda.load(xml, "ArrayOfPeople");
    
            qDebug() << "List:::\n" << list;
    
            GroupDataModel *datamodel = (GroupDataModel*)mListView->dataModel();
            // add the data to the model
            datamodel->clear();
            datamodel->insertList(list.value());
            datamodel->setSortingKeys(QStringList() << "givenName" << "sn");
            qDebug() << "PeopleFinder::PeopleFinder::requestFinished::\t"
                    << "Datamodel set size:: " << datamodel->size();
    
            // Set the new data model on the list and stop the activity indicator
    
        } else {
            qDebug() << "\n Problem with the network";
            qDebug() << "\n" << reply->errorString();
        }
    }
    

    But now, the real problem begins as in how to convert QByteArray data type of QVariantList which can be loaded into the datamodel
    I don't want to write the data to the XML file and then pass that as a list his will is very slow, once I move test environment to the production environment.

    Please help me solve this problem

    I got it to work using xml parsing with QXmlStreamReader

  • help to load xml data into a loop

    Hola amigos, acudo a ustedes porque estoy doing a small application that muestre archivos para mi nueva zona of descargas, esta take utilizando diagramacion paint (gracias por los slideshows as against aqui) y los archivos los carga desde los datos a xml file.
    I have a movieclip cargado con addChild, y knew vez dentro carga tambien con addChild varios insert utilizando UN loop, the cosa are what who use ese mismo loop para as cada vez shouts the panel of the United Nations, are the cargue los datos xml, pero no puedo hacerlo, sale me el error 1009 respond el object are nulo. ACA the dejo parte del codigo, por if any of ustedes me can help con eso.
    Por adelantado the agradesco.

    Hello people, I come to you because I do a small application that shows the files for my new download area, it is made using liquid layout and files information loading from a xml file.
    I have a movieclip loaded with addChild and Interior load also with addChild several panels by using a loop, the thing is that I wanted to use the same loop for each time to add a new Panel, also load information to an xml file, but I can't do it every time show my 1009 error saying that the object is null (void). Here I leave you a part of the code for them if anyone of you can help me with this.
    Thank you in advance for the help, and here is a sample of the API: http://nesmothdesign.com/Media/home.swf

    set the XML

    var imgLoader:Loader;
    var xml;
    var xmlList:XMLList;
    var xmlLoader:URLLoader = new URLLoader();
    xmlLoader.load (new URLRequest ("listado.xml"));
    xmlLoader.addEventListener (Event.COMPLETE, xmlLoaded);
    function xmlLoaded(event:Event):void
    {
    XML = XML (event.target.data);
    xmlList = xml.children ();
    trace (xmlList.length ());
    }

    Add counter to the panns
    var miContenedor:contenedor;
    miContenedor = new contenedor();
    addChild (miContenedor);
    Tweener.addTween(miContenedor,{x:stage.stageWidth/2-465,time:1,transition:"easeIn"});)
    miContenedor.y = body_mc.y + 10;
    Add container´s children-
    var miPartA:panelTipoA;
    var miPartB:panelTipoB;
    for (var a: int = 0; has < = 3; a ++)
    {
    miPartA = new panelTipoA();
    miPartB = new panelTipoB();
    miContenedor.addChild (miPartA);
    miContenedor.addChild (miPartB);
    miPartA.y = a * miPartA.height + (a * 10);
    miPartB.y = a * miPartB.height + (a * 10);
    miPartB.x = miPartB.width + 15;
    imgLoader = new Loader();
    imgLoader.load (new URLRequest (xmlList [a] .attribute ("thumb")));
    miContenedor.miParteA.addChild (imgLoader);
    }

    Atention: las 3 of code lines should add the respective to the pannel xml file data.

    miContenedor.miParteA.addChild (imgLoader);

    is the problem.  There is no miContenedor.miParteA.  use:

    miParteA.addChild (imgLoader);

  • Loading XML data

    Can anyone help on how to load the XML data into the oracle table.

    If there is a tutorial, I can talk through will be great. As I can see instant and draw my mapping.

    Hello

    What version do you use?

    There is a lever XDB here text that allows a better understanding;
    http://blogs.Oracle.com/warehousebuilder/2007/09/leveraging_xdb.html

    See you soon
    David

  • Extraction of XML data and display new line

    I have a table named, SAPDATABROWSER, which has several columns and lines. A column named SAPTEXT (data type: CLOB) consist of xml data. Each XML data are different in terms of number of nodes, but has the same following structure:

    < SAP_BAPI_PROP >
    < SelectedProperty >
    < structure >
    < field > < / field >
    < length > < / length >
    < FieldValue > < / FieldValue >
    < type > < / Type >
    < priority > < / priority >
    < / structure >
    < / SelectedProperty >
    < / SAP_BAPI_PROP >

    So now, what I would do is, to extract the values: field, FieldValue and the length of each line (total 72) and see the result as follows.

    Length of track FieldValue
    XXXX YYYY ZZZZ
    PPPP QQQQ RRRR
    AAAA BBBB CCCC
    MMMM OOOO NNNN

    Again, each line (total 72) has several XML Data nodes, IE there are several nodes FieldType, length and field and no two XML data/line are similar!

    I use the following code:

    SELECT
    EXTRACT (xmltype (saptext), ' / SAP_BAPI_PROP/SelectedProperty/Structure/Field / text () ');
    EXTRACT (xmltype (saptext), ' / SAP_BAPI_PROP/SelectedProperty/Structure/Length / text () ');
    EXTRACT (xmltype (saptext), ' / SAP_BAPI_PROP/SelectedProperty/Structure/FieldValue / text () ')
    OF sapdatabrowser;

    The code above produces the following result:

    SAP_BAPI_PROP/.../Field/Text () SAP_BAPI_PROP/.../Length/text () SAP_BAPI_PROP/.../FieldValue/text)
    1 XXXXPPPPAAAA YYYYQQQQBBBB ZZZZRRRRCCCC
    2 MMMM OOOO NNNN


    Any suggestions? Thank you very much. :)

    Based on your sample data:

    SQL> select x.*
      2  from sapdatabrowser t
      3     , xmltable(
      4         '/SAP_BAPI_PROP/SelectedProperty/Structure'
      5         passing xmltype(t.saptext)
      6         columns field_name  varchar2(30) path 'Field'
      7               , field_len   varchar2(30) path 'Length'
      8               , field_val   varchar2(30) path 'FieldValue'
      9       ) x
     10  ;
    
    FIELD_NAME                     FIELD_LEN                      FIELD_VAL
    ------------------------------ ------------------------------ ------------------------------
    X                              Y                              Z
    P                              Q                              R
    A                              B                              C
    M                              N                              O
     
    

    (adjust the projected if necessary data types)

  • Load Xml data

    male

    Here are the details of my table & serial number is generated to sequence

    Serial_number NUMBER - 1
    CLIENT_CODE VARCHAR2 (45) Yes.
    Client_name VARCHAR2 (45) Yes.
    NUMBER PHONE_NUMBER (12.0) Yes.

    When I download xml data in my table of his mistake of ths give

    ORA-31011: failure ORA-19202 XML parsing: error occurred in LPX-00210 of XML processing: expected ' < ' instead of 'P '.

    My xml data
    Client telephone Code customer name
    DJ1808 PLAPLAPLAPLA JEAN-JACQUES JAIN 9822054153
    DV559 DEMBELE MOUSTAPHA VYAVAHARE 997094167
    JM1717 CHRISTIANE BERNADETTE MUTHA
    KL940 KUNDAN M OLIVIER 9923871117


    can u help me
    Thank you
    Shyam

    The export to Excel as a CSV file, and then follow the instructions given by previous poster... APEX/Oracle cannot read XLS or XLSX files...

    Thank you

    Tony Miller
    Webster, TX

    Time passes fast like the wind, but the flies from fruits such as bananas.

    If you answer this question, please mark the thread as closed and give points where won...

  • How to load the date and time from text file to oracle using sqlloader table

    Hi friends

    I need you to show me what I miss loading date and time text file in a table oracle using sqlloader

    It's my data in this way (c:\external\my_data.txt)
    7369,SMITH,17-NOV-81,09:14:04,CLERK,20
    7499,ALLEN,01-MAY-81,17:06:08,SALESMAN,30
    7521,WARD,09-JUN-81,17:06:30,SALESMAN,30
    7566,JONES,02-APR-81,09:24:10,MANAGER,20
    7654,MARTIN,28-SEP-81,17:24:10,SALESMAN,30
    my table in the database emp2
    create table emp2 (empno number,
                      ename varchar2(20),
                      hiredate date,
                      etime date,
                      ejob varchar2(20),
                      deptno number);
    the code for the control in this path (c:\external\ctrl.ctl) file
    load data
     infile 'C:\external\my_data.txt'
     into table emp2
     fields terminated by ','
     (empno, ename, hiredate, etime, ejob, deptno)
    This is the error:
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    
    Commit point reached - logical record count 5
    
    C:\>
    any help that I enjoyed

    Thank you

    Published by: user10947262 on May 31, 2010 09:47

    load data
    INFILE 'C:\external\my_data.txt '.
    in the table emp2
    fields completed by «,»
    (empno, ename, hiredate, etime, Elysa, deptno)

    Try

    load data
     infile 'C:\external\my_data.txt'
     into table emp2
     fields terminated by ','
     (empno, ename, hiredate, etime "to_date(:etime,'hh24:mi:ss')", ejob, deptno)
    

    This is the error:

    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    
    Commit point reached - logical record count 5
    
    C:\>
    

    This isn't a mistake, you can see errors in the log file and bad.

  • Retrieving XML data and make it available in a DataGrid

    I need to retrieve the xml data in the file below (mycontactdata.xml) which will be in my current folder in my project directory. I just need to get the XML for the node 2 (list of CONTACTS) which must then be displayed in a DataGrid control. DataGrid will be in a separate mxml file while retrieving the xml data will be in the main mxml Application file.

    Any ideas? Thank you

    <? XML version = "1.0" encoding = "UTF-8" standalone = 'no '? >
    -< DATATABLES >
    -< DATATABLE ID = 'SYSTEM' >
    -< ROW ID = "0" >
    < COLUMN ID = "#SCENE_ID" VALUE = "1" / >
    < / ROW >
    < / DATATABLE >
    -< DATATABLE ID = 'CONTACTS list' >
    -< ROW ID = "0" >
    < COLUMN ID = "CON_ID" VALUE = "7 q 1 ++ 149" / >
    < COLUMN ID = "First name" VALUE = "PATRICIA" / >
    < ID of COLUMN = 'Family name' VALUE = "DEROCHIE" / >
    < ID of COLUMN = "Account name" VALUE = "" BRUCE COUNTY GENERAL HOSP. "/ >"
    < ID of COLUMN = 'Contact of Type' VALUE = 'Head of pharmacy' / >
    < ID of COLUMN = "The main specialty" VALUE = "Not Applicable" / >
    < ID of COLUMN = "Primary phone" VALUE = "15198811220" / >
    < / ROW >
    -LINE ID = "1" >
    < COLUMN ID = "CON_ID" VALUE = "1 + 51 + 2249" / > "
    < COLUMN ID = "First name" VALUE = "DUNCAN C M" / >
    < ID of COLUMN = 'Family name' VALUE = "GRAHAM" / >
    < ID of COLUMN = "Account name" VALUE = "" / > "
    < COLUMN ID = 'Contact of Type' VALUE = 'Doctor' / >
    < ID of COLUMN = 'The main speciality' VALUE = 'General surgery' / >
    < ID of COLUMN = "Primary phone" VALUE = "5198812880" / >
    < / ROW >
    -LINE ID = "2" >
    < COLUMN ID = "CON_ID" VALUE = "1 + 4Z + 3962" / >
    < COLUMN ID = "First name" VALUE = "HENDRINA SUSAN" / >
    < ID of COLUMN = 'Family name' VALUE = 'MCARTHUR' / >
    < ID of COLUMN = "Account name" VALUE = "" / > "
    < COLUMN ID = 'Contact of Type' VALUE = 'Doctor' / >
    < ID of COLUMN = "The main specialty" VALUE = "Generalists" / >
    < ID of COLUMN = "Primary phone" VALUE = "5198814640" / >
    < / ROW >
    -LINE ID = "3" >
    < COLUMN ID = "CON_ID" VALUE = "1 + 51 + 3323" / > "
    < COLUMN ID = "First name" VALUE = "PAUL EDWARD" / >
    < ID of COLUMN = 'Family name' VALUE = 'MCARTHUR' / >
    < ID of COLUMN = "Account name" VALUE = "" / > "
    < COLUMN ID = 'Contact of Type' VALUE = 'Doctor' / >
    < ID of COLUMN = "The main specialty" VALUE = "Generalists" / >
    < ID of COLUMN = "Primary phone" VALUE = "5198814640" / >
    < / ROW >
    < / DATATABLE >
    -< DATATABLE ID = "ACTIVE_LAYOUTS" NAME = "ACTIVE_LAYOUTS" TYPE = "ARRAY" >
    -LINE ID = "1" NAME = "Row" >
    < COLUMN ID = 'TYPE' NAME = VALUE 'TYPE' = "HEAD OFFICE" / >
    < / ROW >
    < / DATATABLE >
    < / DATATABLES >

    This works, even if I'm extremely surprised, there is no way to do it with the e4x syntax:

  • Load xml data into the table

    Hi all

    I have an XML (emp.xml) with data below:

    -< root >
    -< row >
    < name > steve < / lastname >
    < 30 > < / Age >
    < / row >
    -< row >
    < name > Paul < / lastname >
    <>26 < / Age >
    < / row >
    < / root >

    I would like to create a stored procedure to store the xml data into the EMP table.

    EMP
    LastName age
    Steve 30
    Paul 26

    I tried to watch all threads related to this forum, but cannot find the right wire. Any help is greatly appreciated. Thank you

    With

    SQL>  select * from xmltable('root/row' passing xmltype('
    
    steve
    30
    
    
    Paul
    26
    
    ') columns lastname path 'lastname',
                       Age path 'Age')
    /
    LASTNAME   AGE
    ---------- ----------
    steve      30
    Paul       26   
    

    You can now just make a

    Insert into emp as select...

  • Load xml data into an Oracle table

    Hello

    I went through some threads in the forums itself, but for my requirement that nothing comes closer, I write my request. I have a XML like this
    <? XML version = "1.0"? >
    < ACCOUNT_HEADER_ACK >
    < HEADER >
    < STATUS_CODE > 100 < / STATUS_CODE >
    Check < STATUS_REMARKS > < / STATUS_REMARKS >
    < / Header >
    < DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 2 < / SEGMENT_NUMBER >
    PR Polytechnic < REMARKS > < / COMMENTS >
    < / DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 3 < / SEGMENT_NUMBER >
    < REMARKS > PR Polytechnic administration < / COMMENTS >
    < / DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 4 < / SEGMENT_NUMBER >
    < REMARKS > rp Polytechnique finance < / COMMENTS >
    < / DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 5 < / SEGMENT_NUMBER >
    < REMARKS > logistics Polytechnique rp < / COMMENTS >
    < / DETAILS >
    < / DETAILS >
    < HEADER >
    < STATUS_CODE > 500 < / STATUS_CODE >
    < STATUS_REMARKS > process exception < / STATUS_REMARKS >
    < / Header >
    < DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 20 < / SEGMENT_NUMBER >
    Basic Polytechnique < REMARKS > < / COMMENTS >
    < / DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 30 < / SEGMENT_NUMBER >
    < / DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 40 < / SEGMENT_NUMBER >
    Finance basic Polytechnique < REMARKS > < / COMMENTS >
    < / DETAILS >
    < DETAIL >
    < SEGMENT_NUMBER > 50 < / SEGMENT_NUMBER >
    Logistics base Polytechnique < REMARKS > < / COMMENTS >
    < / DETAILS >
    < / DETAILS >
    < / ACCOUNT_HEADER_ACK >

    Here is the xml structure of the master structure and child I want to insert data in Oracle tables using the sql * loader initially tried to create a control file, but I don't know how to terminate in the control file, so I created two control files

    load data
    INFILE 'acct.xml' ' str ' < / DETAIL >»»
    TRUNCATE
    in the xxrp_acct_detail table
    TRAILING NULLCOLS
    (
    dummy fill finished by "< DETAIL >."
    SEGMENT_NUMBER surrounded by '< SEGMENT_NUMBER >' and ' < / SEGMENT_NUMBER >, "
    REMARKS framed by 'Of REMARKS <>' and ' < / COMMENTS >.
    )


    load data
    ACCT.XML INFILE' "str" < / header > ' "»
    TRUNCATE
    in the xxrp_acct_header table
    fields terminated by '< HEADER >.
    TRAILING NULLCOLS
    (
    dummy fill finished by "< HEADER >."
    STATUS_CODE framed by '< STATUS_CODE >' and ' < / STATUS_CODE >. "
    STATUS_REMARKS surrounded by '< STATUS_REMARKS >' and ' < / STATUS_REMARKS >.
    )

    I refer to the same xml file in two control files, where with regard to the first control file, I was able to load the files but the second which I suppose as table header not able to load the records of rest. I get the below error.

    Sheet 2: Rejected - error on the XXRP_ACCT_HEADER, column DUMMY table.
    Field in the data file exceeds the maximum length
    Sheet 3: Rejected - error on the XXRP_ACCT_HEADER, column DUMMY table.
    Field in the data file exceeds the maximum length

    In fact if its possible to seggrate a control file so it will be very useful for me. I'm also open for the external table as option. Please help me in this regard.

    Thanks in advance.

    Concerning
    Mr. Nagendra

    Here are two possible solutions:

    (1) reading the headers and separate details using two XMLTables:

    DECLARE
    
     acct_doc xmltype := xmltype( bfilename('TEST_DIR','acct.xml'), nls_charset_id('AL32UTF8') );
    
    BEGIN
    
     insert into xxrp_acct_details (status_code, status_remarks, segment_number, remarks)
     select x1.status_code,
            x1.status_remarks,
            x2.segment_number,
            x2.remarks
     from xmltable(
      '/ACCOUNT_HEADER_ACK/HEADER'
      passing acct_doc
      columns header_no      for ordinality,
              status_code    number        path 'STATUS_CODE',
              status_remarks varchar2(100) path 'STATUS_REMARKS'
     ) x1,
     xmltable(
      '$d/ACCOUNT_HEADER_ACK/DETAILS[$hn]/DETAIL'
      passing acct_doc as "d",
              x1.header_no as "hn"
      columns segment_number number        path 'SEGMENT_NUMBER',
              remarks        varchar2(100) path 'REMARKS'
     ) x2
     ;
    
    END;
    

    All first (alias X 1) retrieves all headers in separate lines. The HEADER_NO generated column is used to keep track of the position of the header into the document.
    Then, we join a second XMLTable (X 2), passing HEADER_NO, so that we can access the corresponding items in DETAIL.

    (2) reading with one XMLTable, but somewhat more complex XQuery:

    DECLARE
    
     acct_doc xmltype := xmltype( bfilename('TEST_DIR','acct.xml'), nls_charset_id('AL32UTF8') );
    
    BEGIN
    
     insert into xxrp_acct_details (status_code, status_remarks, segment_number, remarks)
     select x.*
     from xmltable(
      'for $i in /ACCOUNT_HEADER_ACK/HEADER
       return
        for $j in $i/following-sibling::DETAILS[1]/DETAIL
        return element r {$i, $j}'
      passing acct_doc
      columns status_code    number        path 'HEADER/STATUS_CODE',
              status_remarks varchar2(100) path 'HEADER/STATUS_REMARKS',
              segment_number number        path 'DETAIL/SEGMENT_NUMBER',
              remarks        varchar2(100) path 'DETAIL/REMARKS'
     ) x
     ;
    
    END;
    

    Here, we use an XQuery query to extract the information that we need.
    Basically it's the same logic as above, but with two nested loops which access each header, then each RETAIL location immediately after in the order of the documents.

    Here is the link to the documentation XMLTable and XQuery in Oracle:
    http://download.Oracle.com/docs/CD/B28359_01/AppDev.111/b28369/xdb_xquery.htm#CBAGCBGJ

  • How to load xml data to dynamic text under a button (AS3)

    Hi all

    I created a button and put some dynamic text in it. But I can not dynamically load text from an xml file.
    See the code below:

    var xmlLoader9:URLLoader = new URLLoader();
    xmlLoader9.addEventListener (Event.COMPLETE, showXML99);
    xmlLoader9.load (new URLRequest ("mempops.xml"));

    function loadXML99(e:Event):void
    {
    XML.ignoreWhitespace = true;
    var tree: XML = new XML (e.target.data);
    var i: Number;
    for (i = 0; i < fir.mylist.length (); i ++)
    {
    mybuton1. Box1.dyntext1.AppendText (FIR.memberz [i] .mname. Text());
    myButton1 = button
    Box1 = movie clip
    dyntext1 = dynamic text box
    }
    };

    and the error message:
    1119: access of property may be undefined box1 through a reference with static type flash.display:SimpleButton.

    Thanks for the help

    SimpleButtons have very limited property, so you can't really add content in them that code can talk.  Your best bet will be to create the button as a movieclip.  MovieClip objects can have code addressable bjects placed in them and can also have properties assigned dynamically.

  • Loading XML data in the tables

    Hi, I am currently working on a calendar of upcoming events. I have everything works fine, including the loading of an xml database based on the month and year in the temporary within the XML onLoad section tables, but my problem is obtaining data in a table that I can look in my DrawDays() function. Right now I'm pushing the content of the temporary table in loadXMLevent() in _root. Calendar.event_text_array and this table is filled up until I get into the DrawDays function. Any help would be greatly appreciated. I deleted the code associated with this email.

    Thank you!
    Chris

    You cannot call DrawDays() until loadEventArray() execution.

  • AJAX/Spry gets MySQL data and images from directory records

    Hello

    I'm under Open-Realty (Real Estate Listings Software - http://www.open-realty.org ) with MySQL.

    Open-Realty stores its data in the MySQL database while saving his images in Directory folders.

    I am trying to convert the web site to display real estate listings using Ajax/Spry framework without reloading an entire page every time.

    I have no problem getting to the screen/get data from MySQL using Ajax/Spry, but I still don't have to figure out how to get the images of directory records to match with MySQL database.

    All this may be donw in the environment or the Dreamweaver Extensions?

    Or at least point me in the right direction pls?

    Can someone please give me some advice pls?

    Thanks in advance.

    Tommy

    You can read my article "Exchanging data using the Spry Ajax and PHP framework" in the Adobe Developer Center - he actually treats, vaguely said, displaying images from a directory that s associated with some 'item ID': http://www.adobe.com/devnet/dreamweaver/articles/spry_php_images.html

Maybe you are looking for