load the XML file field Companion without cross-domain policy file

Hello.

Assuming that there are two areas companions on the same server: /public_html/domain1.com and /public_html/domain2.com

I'm trying to load the XML from domain2.com in domain1.com without using a cross-domain policy file (since it does not work with xml files in my case).

So the idea is to use a php file to load XML and read it back to Flash.

I found an interesting scripts that seems to do the job, but unfortunately I can't make it work. In my opinion, there is somewhere with AS3 part problem. Please take a look.

Here's the AS3/PHP scripts:

AS3 (.swf in www.domain1.com):

location of the xml file you want to load, full http address

var xmlLoc:String = " " http://www.Domain2.com/MyFile.XML ";

location of the php xml grabber, regarding the .swf

var phpLoc:String = "loadXML.php";

var xml;

var loader: URLLoader = new URLLoader();

var request: URLRequest = new URLRequest (phpLoc + "? location =" + escape (xmlLoc));

loader.addEventListener (Event.COMPLETE, onXMLLoaded);

loader.addEventListener (IOErrorEvent.IO_ERROR, onIOErrorHandler);

Loader.Load (request);

function onIOErrorHandler(e:IOErrorEvent):void {}

trace ("there was an error with the xml file" + e);

}

function onXMLLoaded(e:Event):void {}

trace ("RSS feed has been loaded");

XML = new XML (loader.data);

/ / string value, because it is passed from php as object

XML = XML (xml.toString ());

xml_txt.text = xml;

}

PHP (loadXML.php to www.domain1.com):

<? PHP

Header ("Content-type: text/xml");

$location = "";

{if (isset($_GET["location"]))}

$location = $_GET ['location'];

$location = urldecode ($location);

}

$xml_string = getData ($location);

return the url encoded Flash vars

echo $xml_string;

Loops of a URL and returns

function getData ($query) {}

/ / create resource curl

$ch = function curl_init();

/ / cURL url

curl_setopt ($ch, CURLOPT_URL, $query);

Set some required params for the use of CURL

curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false);

curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);

Execute the loop works and decode the returned JSON data

$result = curl_exec;

return $result;

/ / Close the curl resource to free up system resources

curl_close ($ch);

}

? >

I think you might be right about / permissions on the server for php settings. Unfortunately I'm not allowed to adjust.

So I wrote my own script - this time I used the path instead of the http address of the XML file.  It works fine in my case.

Here it is:

XML file on domain2.com:

SWF on domain1.com:

var imagesXML:XML;

var variables: URLVariables = new URLVariables();

var varURL:URLRequest = new URLRequest ("MyPHPfile.php");

varURL.method = URLRequestMethod.POST;

variable = varURL.data;

var MyLoader:URLLoader = new URLLoader;

MyLoader.dataFormat = pouvez;

MyLoader.addEventListener (Event.COMPLETE, XMLDone);

MyLoader.load (varURL);

function XMLDone(event:Event):void {}

var imported_XML:Object = event.target.data.imported_XML;

imagesXML = new XML (imported_XML);

MyTextfield_1.text = imagesXML;

MyTextfield_2.text = imagesXML.image [0] .attribute ("thumbPath");  reference sample to assign "thumbPath' of the first item

}

php on domain1.comfile:

<>

$xml_file = simplexml_load_file('.. /.. / /galleries/gallery_1/MyXMLfile.xmldomain2.com');  Directory of XML file on the same server

$imported_XML = $xml_file-> asXML();

Print "imported_XML =". $imported_XML;

?>

Concerning

PS: for those who have read the foregoing: the first and the second script works but you need to test which one is best for your situation. The first script will work also between two domains located on different servers. No. cross necessary domain policy file.

Tags: Adobe Animate

Similar Questions

  • load the xml file into a database to help table of travel point

    Hello

    Someone help me please with a possible approach. I have an interface for APEX users where users can download a file xml in apex table wwv_flow_files using the element to browse with a button "submit". Now, after loading the xml file in the wwv_flow_files table. I need to read and load the xml data into a table sample_tbl. I'm using the version of Oracle APEX 4.0 and Oracle 10 g R2 database. Here is an example of XML file to load. Please help me possible suggestions.

    <? XML version = "1.0" encoding = "UTF-8"? >

    < dataroot generated =... >

    < MySample >

    < KeyId > 1234 < / KeyId >

    eddskc < KeyName > < / KeyName >

    < scheduleDate > 2013-06-16T 00: 00:00 < / ScheduleDate >

    < StartTime > 2013-06-16T 08: 00:00 < / StartTime >

    < EndTime > 2013-06-16T 08:30:00 < / EndTime >

    < / MySample >

    < MySample >

    < KeyId > 5678 < / KeyId >

    jppdf < KeyName > < / KeyName >

    < scheduleDate > 2013-05-19T 00: 00:00 < / ScheduleDate >

    < StartTime > 2013-05-19T 08: 00:00 < / StartTime >

    < EndTime > 2013-05-19T 08:30:00 < / EndTime >

    < / MySample >

    < / dataroot >

    Thanks in advance.

    Thank you

    Orton

    orton607 wrote:

    My sample_tbl has a start_time field and its data type DATE.

    Good.  Be sure to always store dates as the DATE.

    The application (in this case, APEX) needs to format the date date type in the appropriate human-readable format.

    The problem with the incoming data is the 't'.  You will need to convert a space using REPLACE() in the framework so that your SELECT statement

    From there on, conversion to the DATE data type is simply

    to_date( replace( start_time_str, 'T', ' '), 'YYYY-MM-DD HH24:MI:SS') as start_time
    

    And, just in case where, the conversion of DATE for the desired format:

    to_char( start_time, 'MM/DD/YYYY HH12:MI:SS AM')
    

    Although, I'm 'hours' as being left-padded with zeros... Am I looking for how / if you can get rid of the zero prefix (0).

  • Load the XML file into oracle DB using OWB

    Hi friends,

    I'm new XML data.
    I had a requirememnt to load the xml file into an oracle table.
    Can someone procedure to load the data.

    Thanks in advance

    see this

    http://blogs.Oracle.com/warehousebuilder/2007/09/leveraging_xdb.html

  • Load the XML file into oracle using sql loader

    Hello

    I'm trying to load an xml file into a table using sqlldr.
    I have a table as follows:
    CREATE TABLE xmlloadtable
    ( id number,
     data_xml XMLType
     )
      XmlType data_xml STORE AS CLOB;
    I have a control file that I know is perfectly false:
    LOAD DATA 
    INFILE '/home/oraread/'
    INTO TABLE xmlloadtable 
    (
    id,
    data_xml 
    )
    I googled for the file control and tried in different ways, but of no use.
    I want to load the entire xml file into the table.
    Can someone help me with the correct control file. Any help is appreciated!

    Try this

    LOAD DATA
    INFILE '/home/oraread/'
    INTO TABLE xmlloadtable
    (id,
     file_name          filler,
     data_xml          lobfile(file_name) terminated by eof
    )
    

    You can add the file as a column name field to your table between the id and xml column and remove the word to fill in the .ldr file if you need to keep the name of the file

  • Load the XML file into Oracle external Table


    I load the data from the XML file into an intermediate table Oracle using external Tables.

    Let's say below, it is my XML file

    < header >
    < A_CNT > 10 < / A_CNT >
    < E_CNT > 10 < / E_CNT >
    < AF_CNT > 10 < / AF_CNT >
    < / header >
    < student >
    <>students-details
    < Student_info >
    < Single_Info >
    < ID > 18 / < ID >
    New York < City > < / City >
    < country > United States < / country >
    < Name_lst >
    < Student_name >
    Samuel < name > < / name >
    Paul < Last_name > < / Last_name >
    < DOB > 19871208 < / DOB >
    Aware of < RecordStatus > < / RecordStatus >
    < / Student_name >
    < Student_name >
    Samuel < name > < / name >
    Paul < Last_name > < / Last_name >
    < DOB > 19871208 < / DOB >

    < TerminationDt > 20050812 < / TerminationDt >
    History of < RecordStatus > < / RecordStatus >
    < / Student_name >
    < / Name_lst >
    < Personal_Info >
    <>men < / Type >
    < 27 > < / Age >
    < / Personal_Info >
    < / Single_Info >
    < / Student_info >

    < student - register >
    class < A >
    < info >
    < detail >
    < ID student > 18 < / student >
    EE < major > < / Major >
    < course-Grades >
    < course > VLSI < / course >
    < degree > 3.0 < / Grade >
    < / course-Grades >
    < course-Grades >
    < course > nanotechnology < / course >
    < degree > 4.0 < / Grade >
    < / course-Grades >
    < / details >
    < detail >
    < ID student > 18 < / student >
    THIS < major > < / Major >
    < / details >
    < / info >
    class < A >
    < Student_Enrol >
    <>students-details
    < student >

    I load this XML data file into a single table using an external Table. Could someone help me please with coding.

    Thank you

    Reva

    Could you please help me how to insert my XML content into that.

    Same as before, try a plain old INSERT:

    insert into xml_pecos

    values)

    XmlType (bfilename ('XML_DIR', "test.xml"), nls_charset_id ('AL32UTF8'))

    );

    But you'll probably hit the same limitation as with the binary XMLType table.

    In this case, you can use FTP to load the file as a resource in the XML DB repository.

    If the XML schema has been registered with the hierarchy enabled then the file will be automatically inserted into the table.

    Could you post the exact statement that you used to save the scheme?

    In the meantime, you can also read this article, I did a few years ago, it covers the XML DB features that may be useful here, including details on how to load the file via FTP:

    https://odieweblog.WordPress.com/2011/11/23/Oracle-XML-DB-a-practical-example/

    And documentation of the course: http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb06stt.htm#ADXDB4672

  • Need help with loading the XML file

    Hello

    I spent reviewing the web/forums for an example on how to do this for a few days now.  I managed to get this working in Flash Pro easily enough, but I think I'm missing something when I want to do the same thing in Flex.

    Basically, I want to load an XML file and then set the values of the text of labels 5, equal to the data in the XML file.

    So I have a button created in MXML and have put the following click event:

    Click = "dsSetup (Event)" "

    I also stated the following:

    public var myRequest:URLRequest = new URLRequest ("assets/myFile.xml");   folder located under the CBC in project

    public var myLoader:URLLoader = new URLLoader();

    public var myXML:XML;

    My function that loads is as follows:

    public function dsSetup(event:MouseEvent):void

    {

         trace ("dsSetup");

    myXML = new XML (myLoader.data);

    H3. Text = myXML.source.itemA;

    H4.text = myXML.source.itemB;

    H5.text = myXML.source.itemC;

    H7.text = myXML.source.itemD;

    H8.text = myXML.source.itemE;

    currentState = "MainMenu";

    }

    myLoader.addEventListener (Event.COMPLETE, dsSetup);   I think that this line is no longer as I put it in the MXML

    myLoader.load (myRequest);

    It's the way I did in Flash and it worked fine, but I must be missing something when it comes to Flex.

    Can you explain or point me to a good tutorial that shows how to load XML in Flex code?

    Those I've found seems to have about 50 lines of code just to load a file and add through a complex for a beginner.

    Thank you very much

    I suggest you save the data loaded in a variable that can be linked, then bind the properties of the text - who:

    [Bindable]

    var myXML:XML;

    public void dsSetup(event:MouseEvent):void

    {

    myXML = new XML (myLoader.data);

    currentState = "MainMenu";

    }

    ...

  • Problem with the date when you load the XML file into Oracle Database 10g

    Hi all

    I have the interface as shown in the screenshot below. In this document, among other things, I am mapping to an element XML file representing a date to an Oracle table column defined as DATE. The source and target columns are highlighted in the screenshot.

    ! http://img223.imageshack.us/img223/1565/odiscr275.jpg!

    When I run the interface, I get the following error message:

    java.lang.IllegalArgumentException to java.sql.Date.valueOf(Date.java:103)

    I guess that this is the conversion of the date!

    I already tried to replace SRC_TRADES. DEAL_DATE with TO_DATE (SRC_TRADES. DEAL_DATE, ' DD/MM/YYYY') on the implementation tab. This feature was not recognized when I executed the interface, so it did not work! The value of date in the XML file is in the format DD/MM/YYYY .

    I guess that Date SQL Oracle functions do not work in the implementation tab. Could someone let me know:

    1. what the Date Conversion function I could use instead?
    2. where can I find a reference to the methods/functions that I use in the implementation tab (if such a reference exists)?

    See you soon.

    James

    Hello.

    Try changing the area of execution at the staging area. Once you change it, write in the map box just SRC_TRADERS. DEAL_DATE. When you use TO_DATE, the source field typu should be varchar2, no date (as it is in store for your data source)

  • SQLLDR does load the XML file

    Hello

    In 10g r2, I created the ext_acceptance of the table in the schema XDB:

    create the ext_acceptance of xmltype table
    XmlSchema 'external_acceptance.xsd' element 'acceptance ';

    Then I tried to load an XML with a record using this control file:

    DOWNLOAD THE DATA
    + INFILE * +.
    IN THE TABLE TRUNCATE xdb.ext_acceptance
    XMLType (xmldata)
    FIELDS)
    XMLDATA LOBFILE (CONSTANT STD_ACPT_20090414131553_861.dat_996.xml)
    +)+

    The result was no responsible record and no mistake.

    I also tried to create the ext_acceptance table in another schema, but it does not.

    ORA-31000: resource 'external_acceptance.xsd' is not a document schema XDB

    Thanks for your help.

    I had the exact issue with a control file that looked incredibly similar. I added a few pieces to mine and he introduced data 33 times when it was supposed only to arrive at once. But at least I got something!

    DOWNLOAD THE DATA
    INFILE 'ccd.xsd '.
    IN THE SANDBOX TABLE. XHolder
    XMLTYPE (xmldata)
    FIELDS (xmldata LOBFILE (CONSTANT ccd.xsd)
    COMPLETED BY EXPRESSIONS OF FOLKLORE)
    BEGINDATA
    0

  • Loading the XML file with the missing elements dynamically by ODI

    Hi guys,.

    I have the XML with two nodes Employee and address below. On a daily basis, sometimes the address element might not come from the source xml file, but my interface has columns mapped to the elements of the address, and that is why it may fail because of the source element is not found in the file or data could not get charged because the State 'and' in the sql query that is generated between the employee and address elements.  Is there a way where I can load the data dynamically where I can search in the file only for items (used) present and dynamically loading data only for these items?

    XML file:

    <? XML version = "1.0" encoding = "UTF-8"? >

    < EMP >

    < Empsch >

    < employee >

    < EmployeeID 12345 > < / EmployeeID >

    < original > t < / initials >

    John < name > < / LastName >

    DOE < FirstName > < / name >

    < / employee >

    < address >

    < > 12345 as WorkPhone < / as WorkPhone >

    < WorkAddress > test 234 < / WorkAddress >

    < / address >

    < / Empsch >

    < / EMP >

    Thank you

    Fabien Tambisetty

    I managed to solve it by using left outer joins, and in referring to the structure of the table of the XSD

  • Loading the XML file inside a Bpel process

    Hello
    I have a bpel process in which I read an xml file that is in the MDS, in this xml file I find information if certain values, so my question is if, every time I execute the command to search for the information contained in the XMLFile step open the file?
    I use the following sentence:
    oraext:Lookup-XML('oramds:/apps/Fer_Common/XML/Error.XML','/errorCodes/ErrorCode','name','value',bpws:getVariableData('Variable_2'))

    Is it possible to load only once in the first call of bpel process?, I mean, I don't want to load the file whenever I need to read something from the xml.
    Concerning
    Yuri

    Hello
    DVMs are also accessible from the BPEL. You can create an assign activity, and in the expression builder, you have a set of functions called features DVM. You can use these functions to search in the DS.
    You can also use the same functions in the transformations.

  • Question to load the XML file into Oracle via ODI: LKM and IKM adjustment

    Hi all

    I am currently building an ODI interface to upload my file system XML local in a 10 g to Oracle database.

    I received the error message shown in the screenshot below:

    ! http://img529.imageshack.us/img529/3491/odiscr175.jpg!

    The main problem I have is, I don't know all what LKM or IKM assign.

    Can someone offer any assistance/advice?

    Thanks in advance.

    James

    James
    You must select the LKM SQL for Oracle (or LKM SQL for SQL) and then within Oracle to integrate Oracle the IKM incremental update or append IKM SQL command.
    Reading XML, you can just use the standard SQL KMs. (when writing, there's a little more necessary artifice, and this can be done by using specific IKMs)
    Hope this helps

  • [Database Toolbox] possibility to Load From xml file in Labview and then in the database

    Before you write in my database, I want to save it and reload if the user wants to cancel the new charge that can last several minutes.

    If he cancels the load I get back my previous database data.

    I managed to save my database in XML through the "DB tools SaveRecordSet To File" VI. This VI records directly contains my database table in the xml file. And finally, I only if the other VI to load file will do the same thing, means load the file and save it in my database but it gives just a recordset in labview.

    Question: is it possible just to load the xml file into the database directly through Labview?

    Why, finally, these screws do not have the same behavior?

    I don't know, but I just thought I would chime, that if you fail to do with LabvIEW, you might want to look by making your writing in a 'Transaction' database, if your DBM takes in charge (most except MS Access)

  • shipment value of the PHP variable to Flash to load an xml file

    I would like to load an XML file to the local location or on the server to ignore the name of the file. I use PHP to send the name of the Flash file.

    Here it is the PHP code:

    <? PHP

    filesInDir ('C:\Documents and Settings\457305\My Documents\shrikant\Flash Tutorials\webassist');

    function filesInDir ($tdir)

    {

    $dirs = rewinddir(3) ($tdir);

    foreach ($dirs as $file)

    {

    If (($file == '.') |) ($file == '..'))

    {

    }

    else if (is_dir ($tdir. » /'. $file))

    {

    filesInDir ($tdir. » /'. $file);

    }

    on the other

    {

    echo "fileName = $file";

    }

    }

    }

    ? >

    And here is the Actionscript code loading:

    import flash.net.URLLoader;

    import flash.net.URLRequest;

    import flash.events.Event;

    to import flash.net.URLVariables;

    Stop();

    Set the PHP file to load

    var phpFile:String = " " http://localhost/WebAssist/test.php ";

    var cons_xml:XML;

    var xmlLoader:URLLoader = new URLLoader();

    Specify the property dataFormat of the URLLoader to be "VARIABLE".

    This ensures the variables loaded into Flash with the same variable names

    xmlLoader.dataFormat = pouvez;

    xmlLoader.load (new URLRequest (phpFile));

    xmlLoader.addEventListener (Event.COMPLETE, processXML);

    function processXML(evt:Event):void

    {

    trace (evt. Target.Data.FileName);

    cons_xml = new XML (evt.target.data.fileName);

    gotoAndPlay (2);

    }

    When I trace evt.target.data it displays "fileName = mainOpenEndedXML % 2Exml" and when I trace evt.target.data.fileName the file name is correctly displayed as 'mainOpenEndedXML.xml'.

    But in the two next lines where the loading is done that it does not load the file IE does not play the SWF to an xml file.

    I've searched the Internet to find answers, but not able to find solutions.

    Loading works fine if I insert the xml file directly in the code and the SWF in the XML file plays correctly. Here it is the code for the same thing:

    import flash.net.URLLoader;

    import flash.net.URLRequest;

    import flash.events.Event;

    to import flash.net.URLVariables;

    Stop();

    var cons_xml:XML;

    var xmlLoader:URLLoader = new URLLoader();

    xmlLoader.load (new URLRequest ("mainOpenEndedXML.xml"));

    xmlLoader.addEventListener (Event.COMPLETE, processXML);

    function processXML(evt:Event):void

    {

    cons_xml = new XML (evt.target.data);

    gotoAndPlay (2);

    }

    Any help on this would be greatly appreciated


    You said you use PHP to send the name of the Flash file.  If the php file you provide only the name of the xml file that you need to load, then you will have to load the xml file in the same way that you show in your last set of code where you say that load you it directly.

  • How to load an XML file and save it as a file fm

    Hi Experts,

    I have a bunch of XML files in a folder. I want to make is that I want iteratively, load the xml using a StructuredApplication and save it as a file FM. I was able to sucessfully load the XML file, but I'm having trouble to save a file of FM.

    Here is the code I wrote so far:

    If (sourceFolder! = null) {/ / If a valid file is selected}

    files = new Array();

    fileType = "*.xml";

    files = sourceFolder.getFiles (fileType);  Download all the files that match the pattern

    If (files.length > 0) {/ / get the destination to save the files}

    destFolder = Folder.selectDialog ('Select the folder where you want to save the converted XML files.', ' ~');

    for (var i = 0; i < files.length; i ++) {}

    Set the options to open the XML file.

    var openParams = GetOpenDefaultParams();

    var j = GetPropIndex (openParams, Constants.FS_OpenAsType);

    . propVal.ival openParams [j] = Constants.FV_TYPE_XML;

    j = GetPropIndex (openParams, Constants.FS_StructuredOpenApplication);

    . propVal.sval openParams [j] = "XML Snpsbook";

    j = GetPropIndex (openParams, Constants.FS_FileIsOldVersion);

    . propVal.ival openParams [j] = Constants.FV_DoOK;

    j = GetPropIndex (openParams, Constants.FS_FontNotFoundInDoc);

    . propVal.ival openParams [j] = Constants.FV_DoOK;

    j = GetPropIndex (openParams, Constants.FS_FileIsInUse);

    . propVal.ival openParams [j] = Constants.FV_DoCancel;

    j = GetPropIndex (openParams, Constants.FS_AlertUserAboutFailure);

    . propVal.ival openParams [j] = Constants.FV_DoCancel;

    var returnParams = new PropVals();

    I'M NOT ABLE TO GET THIS LINE TO RUN. sourceDoc RETURNS a REFERENCE of OBJECT INVALID.

    sourceDoc = Open (files [i] .name, openParams, returnParams);  Returns the document object

    Alert (SourceDoc.Name);

    Function to save. XML file. Extension of the FM

    var saveParams = GetSaveDefaultParams();

    var returnParamsp = new PropVals();

    Change the extension .xml FM

    var k = GetPropIndex (saveParams, Constants.FS_FileType);

    saveParams [k].propVal.ival = Constants.FV_SaveFmtBinary;

    saveAsName = sourceDoc.name.replace (/ \.) [ ^\.\\]+$/,".fm");

    var saveInFile = record (saveAsName, saveParams, returnParamsp);  Save as file FM

    saveInFile = new file (destFolder + ' / ' + targetFile);

    saveInFile.close ();  Close file

    }

    Alert ("the files are saved in the FM to ' + destFolder");

    } else {}

    Alert ('no matching files found!');

    }

    }

    Hi reda,.

    You are very close, but there are a few critical flaws in your code that will prevent the proper functioning:

    -Your paths in string literals must have sequences to escape the backslashes. A backslash character is treated as an adverb in an escape sequence, so those need to be escaped themselves. For example: "C:\\Users\\rajrev\\file.xml."

    -Your OpenXMLFile () function does not return anything, then the original DocumentSource variable never gets made.

    -It is better to use the ObjectValid() method to test a valid object of FM.

    -I am not an expert of regular expression, but I can't understand the logic in your replace() method, to create the new path of the file. In addition, the property "name" of the fileObject is invalid, it must be 'name '. I think that there are simpler ways to do.

    -Your call to the Save() method is incorrect. It should be fileObject.Save (saveAsName, saveParams, returnParamsp).

    All that being said, here is a quick review, without comment, that works for me:

    var sourceDoc = openXmlFile("C:\\Users\\rajrev\\file.xml","XML snpsbook");
    if (sourceDoc.ObjectValid()) {
    
        var path = sourceDoc.Name;
        var filename = path.substring((path.lastIndexOf("\\") + 1), path.length);
        filename = filename.replace(".xml", ".fm");
    
        path = path.substring(0, (path.lastIndexOf("\\") + 1));
        path = path + "transformed_files\\" + filename;
    
        //path testing
        //alert(path);
    
        saveToFm(sourceDoc, path);
        sourceDoc.Close(0);
    }
    
    // Function to open and XML file
    function openXmlFile(filePath, structApp) {
        var openParams = GetOpenDefaultParams();
        var i = GetPropIndex(openParams, Constants.FS_OpenAsType);
        openParams[i].propVal.ival = Constants.FV_TYPE_XML;
        i = GetPropIndex(openParams, Constants.FS_StructuredOpenApplication);
        openParams[i].propVal.sval = structApp;
        var  returnParams = new PropVals();
        var doc = Open(filePath, openParams, returnParams);
        return doc;
    }
    
    //Function to save the opened XML as an FM file
    function saveToFm(fileObject, savePath) {
        var saveParams = GetSaveDefaultParams();
        var i = GetPropIndex(saveParams, Constants.FS_FileType);
        saveParams[i].propVal.ival = Constants.FV_SaveFmtBinary;
        var saveAsName = savePath;
        var returnParamsp = new PropVals();
        fileObject.Save(saveAsName, saveParams, returnParamsp);
    }
    
  • Loading the XML in Oracle XML Table/OWB

    Hi gurus,

    Need help to load the XML file into oracle XML table /OWB.

    Here is an example of XML file

    < GEBIZ_PURCHASE_ORDER xmlns = "http://ordabc.xmlbeans.order.importexport.de" >
    < HEADER >
    external < ORDER_CODE > < / ORDER_CODE >
    < EXTERNAL_SYSTEM_CODE > E < / EXTERNAL_SYSTEM_CODE >
    < AMENDMENT_NUMBER > 1 < / AMENDMENT_NUMBER >
    < VARIATION_NUMBER > 1 < / VARIATION_NUMBER >
    document in < DESCRIPTION > < / DESCRIPTION >
    < FINANCIAL_SYSTEM >
    PR < SUB_BUSINESS_UNIT > < / SUB_BUSINESS_UNIT >
    < NFS >
    < COST_CENTER_GROUP > 21 < / COST_CENTER_GROUP >
    < BUYER_CODE > 121 < / BUYER_CODE >
    < FINANCIAL_SYSTEM_ORDER_CODE > 23 < / FINANCIAL_SYSTEM_ORDER_CODE >
    < USER_NRIC > 8 < / USER_NRIC >
    < / NFS >
    < SAP >
    < PURCHASING_GROUP > 3 < / PURCHASING_GROUP >
    < / SAP >
    < / FINANCIAL_SYSTEM >
    < STATUS > ELEMENT < / STATUS >
    < / Header >
    ELEMENTS <>
    < ITEM >
    < LINE_NUMBER > 1 < / LINE_NUMBER >
    the COSTS OF HANDLING < DESCRIPTION > < / DESCRIPTION >
    < UNIT_OF_MEASURE > M < / UNIT_OF_MEASURE >
    < QUANTITY > 12 < / QUANTITY >
    SERVICES < LINE_TYPE > < / LINE_TYPE >
    < UNIT_PRICE > 12 < / UNIT_PRICE >
    < PRICE_UNIT > 12 < / PRICE_UNIT >
    < > 12 TOTAL_AMOUNT < / TOTAL_AMOUNT >
    < STATUS > < / STATUS >
    < / POINT >
    < ITEM >
    < LINE_NUMBER > 2 < / LINE_NUMBER >
    COSTS OF HANDLING CARGO < DESCRIPTION > < / DESCRIPTION >
    < UNIT_OF_MEASURE > M < / UNIT_OF_MEASURE >
    < QUANTITY > 13 < / QUANTITY >
    SERVICES < LINE_TYPE > < / LINE_TYPE >
    < UNIT_PRICE > 14 < / UNIT_PRICE >
    < PRICE_UNIT > 14 < / PRICE_UNIT >
    < > 1200 TOTAL_AMOUNT < / TOTAL_AMOUNT >
    < STATUS > STATUSDELIVERED < / STATUS >
    < / POINT >
    < / OBJECT >
    < / GEBIZ_PURCHASE_ORDER >

    I created the table and the procedure below

    create the table xxpo_estimate_details
    (ORDER_CODE, varchar2 (100),)
    EXTERNAL_SYSTEM_CODE varchar2 (100),
    AMENDMENT_NUMBER varchar2 (100),
    VARIATION_NUMBER varchar2 (100),
    DESCRIPTION varchar2 (100),
    SUB_BUSINESS_UNIT varchar2 (100),
    COST_CENTER_GROUP varchar2 (100),
    BUYER_CODE varchar2 (100),
    FINANCIAL_SYSTEM_ORDER_CODE varchar2 (100),
    USER_NRIC varchar2 (100),
    PURCHASING_GROUP varchar2 (100),
    FS_STATUS varchar2 (100),
    PR_LINE_NUMBER varchar2 (100),
    PR_DESCRIPTION varchar2 (100),
    UNIT_OF_MEASURE varchar2 (100),
    PR_QUANTITY varchar2 (100),
    LINE_TYPE varchar2 (100),
    Unit_price varchar2 (100),
    PRICE_UNIT varchar2 (100),
    TOTAL_AMOUNT varchar2 (100),
    PR_STATUS varchar2 (100));


    declare
    acct_doc xmltype: = xmltype (bfilename('FLAT_FILES','PO_DETAILS_COPY.xml'), nls_charset_id ('AL32UTF8'));
    BEGIN
    insert into xxpo_estimate_details
    (ORDER_CODE,
    EXTERNAL_SYSTEM_CODE,
    AMENDMENT_NUMBER,
    VARIATION_NUMBER,
    DESCRIPTION,
    SUB_BUSINESS_UNIT,
    COST_CENTER_GROUP,
    BUYER_CODE,
    FINANCIAL_SYSTEM_ORDER_CODE,
    USER_NRIC,
    PURCHASING_GROUP,
    FS_STATUS,
    PR_LINE_NUMBER,
    PR_DESCRIPTION,
    UNIT_OF_MEASURE,
    PR_QUANTITY,
    LINE_TYPE,
    UNIT_PRICE,
    PRICE_UNIT,
    TOTAL_AMOUNT,
    PR_STATUS
    )
    SELECT X 1. ORDER_CODE,
    X 1. EXTERNAL_SYSTEM_CODE,
    X 1. AMENDMENT_NUMBER,
    X 1. VARIATION_NUMBER,
    X 1. DESCRIPTION,
    X 1. SUB_BUSINESS_UNIT,
    X 1. COST_CENTER_GROUP,
    X 1. BUYER_CODE,
    X 1. FINANCIAL_SYSTEM_ORDER_CODE,
    X 1. USER_NRIC,
    X 1. PURCHASING_GROUP,
    X 1. STATUS,
    X 2. LINE_NUMBER,
    X 2. DESCRIPTION,
    X 2. UNIT_OF_MEASURE,
    X 2. QUANTITY,
    X 2. LINE_TYPE,
    X 2. UNIT_PRICE,
    X 2. PRICE_UNIT,
    X 2. TOTAL_AMOUNT,
    X 2. STATUS
    FROM XMLTABLE)
    ' / GEBIZ_PURCHASE_ORDER/HEADER.
    passage acct_doc
    header_no of columns for the ordinalite,
    Path of varchar2 (100) ORDER_CODE "ORDER_CODE"
    Path of varchar2 (100) EXTERNAL_SYSTEM_CODE "EXTERNAL_SYSTEM_CODE"
    Path of AMENDMENT_NUMBER VARCHAR2 (100) "AMENDMENT_NUMBER."
    PATH OF VARCHAR2 (10) VARIATION_NUMBER "VARIATION_NUMBER"
    DESCRIPTION VARCHAR2 (100) PATH "DESCRIPTION."
    PATH OF VARCHAR2 (100) SUB_BUSINESS_UNIT "FINANCIAL_SYSTEM/SUB_BUSINESS_UNIT,"
    PATH OF VARCHAR2 (10) COST_CENTER_GROUP "FINANCIAL_SYSTEM/NFS/COST_CENTER_GROUP,"
    PATH OF VARCHAR2 (50) BUYER_CODE "FINANCIAL_SYSTEM/NFS/BUYER_CODE,"
    PATH OF VARCHAR2 (50) FINANCIAL_SYSTEM_ORDER_CODE "FINANCIAL_SYSTEM/NFS/FINANCIAL_SYSTEM_ORDER_CODE,"
    PATH OF VARCHAR2 (50) USER_NRIC "FINANCIAL_SYSTEM/NFS/USER_NRIC,"
    PATH OF VARCHAR2 (50) PURCHASING_GROUP "FINANCIAL_SYSTEM/SAP/PURCHASING_GROUP,"
    PATH VARCHAR2 (50) STATUS 'STATUS '.
    ) X 1,
    XMLTable)
    ' / GEBIZ_PURCHASE_ORDER/ITEMS/ITEM ".
    passage acct_doc
    columns for the ordinalite header_no
    path of columns LINE_NUMBER varchar2 (10) "LINE_NUMBER.
    Path varchar2 (100) DESCRIPTION "DESCRIPTION."
    PATH OF VARCHAR2 (100) UNIT_OF_MEASURE "UNIT_OF_MEASURE"
    PATH VARCHAR2 (10) OF "QUANTITY."
    PATH OF VARCHAR2 (100) LINE_TYPE "LINE_TYPE"
    PATH OF VARCHAR2 (10) UNIT_PRICE "UNIT_PRICE."
    PATH OF VARCHAR2 (10) PRICE_UNIT "PRICE_UNIT"
    PATH OF VARCHAR2 (10) TOTAL_AMOUNT 'TOTAL_AMOUNT ';
    PATH VARCHAR2 (120) STATUS 'STATUS '.
    ) X 2;
    -EXCEPTION
    -WHILE OTHERS THEN
    -DBMS_OUTPUT. PUT_LINE (' ERROR ' |) SQLERRM);
    END;

    When I run the above procedure, it runs successfully but the records charge not in the table.

    When I remove the attribute xmlns = "http://ordabc.xmlbeans.order.importexport.de" and start the process, and then load the records.

    can you please is it possible in the xml file without change? (deletion of the attribute)

    If choose table for loading XML /OWB XML files then what are challeges and challenges we face.

    Add two expressions XMLTable XMLNAMESPACES clause:

    ...
    
    FROM XMLTABLE(
      XMLNamespaces(default 'http://ordabc.xmlbeans.order.importexport.de')
    , '/GEBIZ_PURCHASE_ORDER/HEADER'
    
    ...
    

Maybe you are looking for

  • Outlook and Chrome not answer-constantly

    I noticed that especially after coming from his sleep, Chrome and Outlook (2011) will not answer.  There is no solution but to the family force them.  An activity Manager does not show their or their assistants to be processor or memory overload; in

  • PhotoSmart Premium C309a: PhotoSmart Premium C309a in Win10 driver to print double-sided problem

    My problem is this: I created a catalog in MS Publisher 2013 for format A4 paper with 2 pages per document. I chose booklet side folding type and print double-sided. MS Publisher prepared pages correctly. I even created versuions PDF of these pages.

  • LabVIEW Communicator Modbus device

  • XP Setup won't find disc?

    I'm trying to reinstall XP after having a few problems which resulted in me having to format the drive. I created an active partition with Super Fdisk with Fat 32 partition. However when I try to run the XP Installer I get a message that XP does not

  • Pavilion dv6 'average recovery' not recognized

    I started to have alerts 'Hard Drive Crash inévitable', so I put in a new hard drive.  Before that, I copied the ' recovery file ' on a 32 GB flash drive.  All right, with my dv6 indicating a copy of recovery successul. I put in the new hard drive an