Php generated xml trouble

Hi,
This is probably something dumb, but here goes...
I've been exploring the basics of incorporating data from a MySQL table into a Flash movie by writing an XML file using PHP to read the data.  All I'm trying to do at this early stage is successfully read the data into my Flash movie and be able to access the nodes.  Here is my script which is pretty much taken from the Flash help files;
var usageXML:XML;
var XML_path:String="create_xml.php";
var XML_URL:URLRequest = new URLRequest(XML_path);
var myLoader:URLLoader = new URLLoader(XML_URL);
myLoader.addEventListener (Event.COMPLETE, xmlLoaded);
function xmlLoaded(event:Event):void {
    usageXML=XML(myLoader.data);
    trace("Data loaded successfully");
    trace(usageXML.day_usage[7].day_summ);
    trace(usageXML.toXMLString());
This code works fine when I switch the file name "create_xml.php" with an xml file that I create by simply copying and pasting the source code for the php file into a new file with the file extension "xml".  But when I run the above as is, I get an error of:
TypeError: Error #1010: A term is undefined and has no properties.
    at test_usage_reports_fla::MainTimeline/xmlLoaded()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
Does anyone see what I am doing incorrectly for a php generated xml file versus an static xml file?
Oh, btw, all three files (Flash movie, php file and static xml file are all in the same directory).

I answered my own question and thought I would post it here in case someone else runs into the same confusion I had.
I changed the name of the file from just the name of the file itself to the full path on the local server ("http://localhost/mysite/create_xml.php") and that worked.  I guess I didn't realize that Flash had to be pointed at the URL and not just the file itself.
Now I can continue with exploring how to actually incorporate the data into the Flash movie.  Yea!

Similar Messages

  • PHP generated XML files in Flash

    I want to create a flash based frontend for my image gallery
    system. I need to load in an php generated xml file (something like
    images.php). But Flash seems to load the unparsed xml file
    (webserver with php works fine). Maybe that's just happening in the
    authoring environment. I'm trying to load the xml file with the
    XML-connector. Can someone give me an advice before I do hours of
    trial'n'error business?

    It seems like I don't get my foot into the AS/XML door. My
    XML looks like this:
    <root>
    <image>
    <url>
    <name>
    <etc>
    (Close tags not shown)
    The XML file is valid and works with XML-connector. I try to
    access the XML data with this AS:
    xml_doc = new XML();
    xml_doc.load('flash.xml');
    xml_doc.onLoad = function(success) {
    //trace(this.toString());
    xml_doc.ignoreWhite = true;
    //trace(xml_doc.toString());
    trace(xml_doc);
    var mainnode:XMLNode = xml_doc.firstChild;
    var imagenodes:Array = xml_doc.firstChild.childNodes;
    for (var i:Number = 0; i < imagenodes.length; i++) {
    // for each person node:
    var imagenode:XMLNode = imagenodes
    images.push(
    {i:i+1,
    url:imagenode.childNodes[0].nodeValue,
    imagename:imagenode.childNodes[1].nodeValue
    trace(images);
    I'm not getting any values out (just 'undefined'). There
    seems to be something missing, but I just don't find out what.
    Cheers,
    Martin

  • PL/SQL to generate XML compliant with an XSD

    Please excuse me if this has been asked elsewhere. I'm trying on Oracle 9.2 to output XML that will comply with a predefined schema. I've started out by creating various object types and an object view that matches the xml schema definition, and can use dbms_xmlgen.getxml to get out an xml document (a clob) without trouble, BUT I need to post-process this with shell scripts to add on the namespace information and amend the tags to put in the (e.g.) ns3: bit to identify which is the target namespace. It seems odd that I should need to do this - is there a better way? I have trawled all over rthe place but cannot find any mention of this requirement. Thanks for any help you might give me, I'm new to xml.

    Okay forget that, here's a quote from Oracle:
    "I'm the PM for XML DB, and our preferred direction for generating XML from data stored in relational tables is the industry standard SQL/XML operators. DBMS_XMLGEN will continue to be supported but most of our development efforts in terms of performance / feature improvements willl be targetted at the SQL/XML operators (XMLELEMENT(), XMLATTRIBUTES(), XMLAGG(), XMLFOREST() etc). In general they have proven to be much more flexible and performant, and easier to use "
    So it seems that the object-type/view route is dead in the water. Shame.

  • Generating XML Output for Eclipse

    Does anyone know if you can customize RoboHelp HTML such
    that, if you generate XML output, you get your TOC in the XML
    needed for Eclipse-based online help platforms? Thanks...

    Good question. The app XML file I was referring to was the one in the source folder. It seems that Flash Builder (or something else, hard to say) is having trouble parsing the brackets and so it's preventing the test app from launching.
    I just told my project to "Execute FlexUnit Tests" again to repro the problem to verify.
    /src/FlexUnitApplication-app.xml
    Contains <content>[...]</content>
    Shows a modification date of 9:04 am (now)
    /bin-debug/FlexUnitApplication-app.xml
    Contains <content>FlexUnitApplication.swf</content>
    Shows a modification date of yesterday (when I last successfully ran the tests)
    I'm unclear why Flash Builder is modifying this file (in the source folder) at all. Should the app XMLs be read-only configurations?

  • Generate xml source file for Oracle Order Capture Print Quote

    Hi,
    I am new to xml and need to work on creating templates for Print Quote.
    I am trying to generate the xml source file for which I enabled the report in system administrator and set the output to XML and assigned to Quoting Reports responsiblity. I then assigned XML Report Publisher to the same responsiblity.
    I ran the report (Print Quote) and then I am trying to run the XML Report Publisher but I cannot get the request id in the list of values.
    I am able to generate xml source file for other reports like Printed Purchase Order etc.,
    The view output for the (Print Quote) report is as follows:
    <?xml version="1.0" ?>
    - <!-- Generated by Oracle Reports version 6.0.8.26.0
    -->
    <ASOPQTER />
    How do I get the xml source file? Or are there seeded templates that I can use to create more templates? Any help would be appreciated. Thanks Ravi

    Hi, I am in the same position - did this issue ever ger resolved by anyone. I have done a few XMLP reports successfully now using the Word add-in, but customising the Quote output differs from other standard reports.
    If you look at the data definition for Quote it is a 'dummy' definition and has no XML file attached. Does anyone know how I can get the XML format for the report output?
    Also the template uses XSL-FO ?!?!?! rather than RTF - not sure how to work with this, the Oracle docs are not very helpful in this regard either.
    Has anyone successfully managed to customise the Quote print report? Many thanks,
    Roger

  • Unable to generate XML's for BLOB datatypes from Concurrent program

    Hi All,
    I've a requirement to print images on rtf layout. Images are uploaded by end user through attahments men
    there are getting stored in fnd_lobs tables.
    for printing blob images we need to convert them into CLOB and generate XML's.
    I've done the conversion through a function and calling the function in the select query which is generating XML when i run it from toad.
    SELECT xmlgen.getXml(
    'SELECT file_id,mob_getbase64String(file_data) photo
    FROM fnd_lobs
    WHERE file_id = 2490481'
    ,0
    ) FROM dual;
    But the same thing we i registered as concurrent program (SQL*Plus) the program is running into error.
    Output file
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource 'https://dbtdev5i.oracleoutsourcing.com/OA_CGI/FNDWRR.e...
    Input truncated to 17 characters
    ^
    Log file
    Concurrent Manager encountered an error while running SQL*Plus for your concurrent request 10868311.
    Review your concurrent request log and/or report output file for more detailed information.
    Can anyone help me through on how to bypass this error and generate XML's.
    Thanks in Advance
    Jana

    Hi Priya..,
    I have changed the query and registered in apps and now i am able to generate XML's of the blob image and the same is getting printed on the tempate..
    DECLARE
    v_colb CLOB;
    v_query VARCHAR2(1000);
    BEGIN
    v_query := 'SELECT file_id,mob_getbase64String(file_data) photo
    FROM fnd_lobs fl,
    fnd_documents_vl fd
    WHERE fd.media_id = fl.file_id
    AND (fd.end_date_active IS NULL
    OR fd.end_date_active > SYSDATE)
    AND fd.security_type = 2
    AND fd.security_id = fnd_profile.value(''GL_SET_OF_BKS_ID'')';
    --FND_FILE.put_line( FND_FILE.LOG,v_query);
    v_colb := xmlgen.getxml (v_query, 0);
    --DBMS_OUTPUT.put_line (v_query);
    FND_FILE.put_line( FND_FILE.OUTPUT,v_colb);
    END;
    /

  • Problem with generating xml and nested cursor (ora-600)

    I have a problem with generating xml (with dbms_xmlquery or xmlgen) and nested cursors.
    When I execute the following command, I get a ORA-600 error:
    select dbms_xmlquery.getxml('select mst_id
    , mst_source
    , cursor(select per.*
    , cursor(select ftm_fdf_number
    , ftm_value
    from t_feature_master
    where ftm_mstr_id = pers_master_id ) as features
    from t_person per
    where pers_master_id = mst_id ) as persons
    from f_master
    where mst_id = 3059435')
    from dual;
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: ORA-00600: internal error code, arguments: [kokbnp2], [1731], [], [], [], [], [], []
    </ERROR>
    The problem is the second cursor (t_feature_master).
    I want to generate this:
    <master>
    <..>
    <persons>
    <..>
    <features>
    <..>
    </features>
    </persons>
    <persons>
    <..>
    <features>
    <..>
    </features>
    </persons>
    </master>
    If i execute the select-statement in sql-plus, then I get the next result.
    MST_ID MST_SOURCE PERSONS
    3059435 GG CURSOR STATEMENT : 3
    CURSOR STATEMENT : 3
    PERS_MASTER_ID PERS_TITLE PERS_INITI PERS_FIRSTNAME PERS_MIDDL PERS_LASTNAME
    3059435 W. Name
    CURSOR STATEMENT : 15
    FTM_FDF_NUMBER FTM_VALUE
    1 [email protected]
    10 ....
    I use Oracle 8.1.7.4 with Oracle XDK v9.2.0.5.0.
    Is this a bug and do somebody know a workaround?

    Very simple...Drop all type objects and nested tables and create them again. You will get no error. I'll explain the reason later.

  • How to generate XML from relational data : PL/SQL or Java

    I'm new to Oracle XML and would appreciate some advice. I've been asked to generate XML documents from data stored in relational tables. The XML documents must be validated against a DTD. We will probably want to store the XML in the database.
    I've seen a PL/SQL based approach as follows :
    1.Mimic the structure of the DTD using SQL object types 2.Assign the relational data to the object type using PL/SQL as required
    3.Use the SYS_XMLGEN package to render the required XML documents from the SQL objects
    However, creating the object types seems to be quite time consuming (step 1 above) for anything other than the simplest of XML documents.
    I've also seen that there is the Java based approach, namely :
    1. Use the XML generator to build Java classes based on a DTD.
    2. Use these classes to build the required XML
    On the face of it, the Java based approach seems simpler. However, I'm not that familiar with Java.
    Which is the best way to proceed ? Is the PL/SQL based approach worth pursuing or should I bite the bullet and brush up my Java ?
    Is it possible to use a combination of PL/SQL and Java to populate the dtd generated java classes (step 2 of the Java approach) to reduce my learning curve ?
    Thanks in advance

    To help answer your questions:
    1) Now, in 9iR2, you can use SQL/XML as another choice.
    2) You can also use XSU to generate the XML and use XSLT to transform it to a desired format instead of using object views if possible.
    3) XDK provide Class generator support to populate XML data to Java classes.

  • Easiest and/or best methods for generating XML output (not with a report)

    Hi, several of our EBS customers (11.5.10) are converting their PDF reports to use XML/BI publisher to produce output. The data stream comes from a report that generates the XML output, and then the XML template is applied. This works great ... no problems, etc. From what I have read, however, Oracle intends to treat the traditional Forms and Reports Developers as legacy tools (although still supporting them, of course).
    My question is if I wanted to ditch using Reports to generate XML output, what, in your opinion or in your current usage, is the easiest way of getting this data? In Reports, the data modeler is excellent in providing a method to write your queries, split them into different repeating groups, write formula and summary columns, link multiple queries, etc, etc. If one were to become Reports Developer free, what comparable tools are available to take its place? I would expect this tool to handle a mix of GUI and coding like the Reports data modeler. Please note that I'm not looking for an EBS-specific solution -- say for a custom application using regular Oracle 10g DB and iAS, with BI Publisher for reporting.
    Thanks for your feedback,
    Ryan

    What I'm looking for is to not use Oracle Reports to generate the XML data output since Oracle's statement of direction is pushing BI Publisher rather than Oracle Reports as the preferred tool for reporting. That said, the data modeler in Reports provides a very flexible tool to construct and link multiple queries and to manipulate the queries into several levels of a master/detail relationship. Further, the mix of GUI and coding makes setting up the data model a lot more efficient. What I'm looking for (and I don't know if anything exists) is something comparable that can be used to generate XML output from the DB -- the idea being that I wouldn't use legacy tools, like Reports, for this task. I hope that is clearer.
    Really, another way of answering my question is, aside from Reports and the APIs mentioned so far, what are my fellow developers using, if anything, to extract XML data in a way that handles the features i list above?

  • Generate XML output using DBMS_XMLGEN.getxmltype and not from rdf

    Hi,
    I have a requirement to display output from a particular table in XL format. Out of all the known possible options, I am planning to use the XML publisher to generate XL output.
    For the data source, instead of using the conventional way of creating XML data using rdf,I am planning to use DBMS_XMLGEN.getxmltype pl/sql procedure to generate the XML output. And from the output, call the template to generate the required Excel output.
    Now, I am using the following code to generate XML output but am not sure how to proceed from here. I need to first print the XML data in the FND Output file after which I was planning to call the 'XML Report Publisher' (XDOREPPB) program and use the current request id to get the excel output but I am not able to find the way to print the XML data in the output file as:
    fnd_file.put_line (fnd_file.output, l_xml_type); - is throwing an error as l_xml_type is an XML data output.
    PROCEDURE xml_main (
    errbuf OUT VARCHAR2
    ,retcode OUT VARCHAR2
    ,p_project_from IN VARCHAR2
    ,p_project_to IN VARCHAR2
    AS
    l_xml_type XMLTYPE;
    BEGIN
    SELECT DBMS_XMLGEN.getxmltype
    ('SELECT fnd_global.conc_request_id
    ,TO_CHAR (segment1)
    ,to_char(start_date,''MM/DD/RRRR'')
    ,to_char(xxmcc_project_details_pkg.current_profit_projection
    (project_id),''999,999,990.90'')
    ,to_char(xxmcc_project_details_pkg.cost_to_date (project_id),''999,999,990.90'')
    ,''1''
    FROM pa_projects_all
    WHERE segment1 BETWEEN NVL (p_project_from, segment1)
    AND NVL (p_project_to, segment1)')
    INTO l_xml_type
    FROM DUAL;
         fnd_file.put_line (fnd_file.output, l_xml_type);
    END xml_main;
    Can anyone point me as to how to publish XML output using a PL/SQL procedure (DBMS_XMLGEN.getxmltype)
    Thanks.

    Pl see if the example included in this presentation helps http://www.oracle.com/technology/products/applications/Events/OOW-2006/EBS/S281401_Sridhar_Bogelli.pdf
    Also, you do not need to explicitly call XDOREPPB in later versions of XML Publisher. If you set up everything correctly (as described in the presentation above and the link below) the Output Post Processor is called automatically after the XML file is generated successfully.
    Another excellent tutorial is at http://www.oracle.com/technology/obe/fusion_middleware/fusion/bi/xmlp_ebiz/index.html
    HTH
    Srini

  • How to generate XML from EBusiness suite ARXSGPO

    Could someone tell me how I can generate XML from the EBusiness Suite Accounts Receivable report ARXSGPO.rdf I understand this report is called by a C program. I have tried changing the concurrent request to output format to XML the result does not resemble XML. Does anyone have any suggestions how I can generate XML from the ARXSGPO report?
    Thanks,
    Mark

    Hi Mark
    the next release of XMLP will have last page only support. The problem is that at the template layer you do not know how many lines are going to fit on the page, so you never know what is going to be the last page. The only way around it for now is to specify the number of lines to a page and then check when all the lines have been rendered and then render the remit portion.
    I have a sample invoice that does the same, drop me a mail, you can work out the email from my name and the fact I work for XMLP Im sure.
    Tim

  • Using servlet to generate XML file

    What I want to do is simple but can't work. Hope you guys can give me a hint.
    I succesfully generate XML file in command line using Oracle XML parser and class generator. Then I was trying to do it using servlet. it compiles fine but generate NullPointer exception at the line:
    Emp e1= new Emp(); //Emp is the root of XML
    I suspect the Emp constructor can't correctly find the globalDTD in its superclass -CGDocument. Please note this only happens in servlet setting, not is command line setting. Any suggestion to get arounf this?
    Another unrelated question is that when I create a XML file using the Oracle XML parser, it seems all the elements a file has to be added once, otherwise the compiler will compalain about the missing element. this will be inconvinient when I constructing a big XML file, which I 'd liek to split into small piece and add them up. Maybe there is a good way but I just don't know it.
    my email: [email protected]

    Hi,
    I'm running into the same problem deploying the classes generated by the class generator. Code works fine from JDeveloper, but had to put my DTD in the directory where my classes are. Deploying the classes with Apache's JServ gives me a NullPointer exception on the first addNode method. I guess it can't find the DTD. I tried to put the DTD in many locations but this didn't fix the problem. Any suggestions?
    Steve,
    Did you fix this problem? Thanx!
    null

  • Generate XML report using MAX Generate report.vi

    Hi All,
    Caught in simple and wierd problem. I'm using a simle VI called MAX Generate Reoprt.vi to generate an XML report but getting error
    Error code -2147220553
     Error description :Incorrect report file extension provided.
    The image of the block diagram is attached. I'm able to generate HTML reoport from MAX(absolutely no probs).
    Thanks in advance
    Regards
    VDC
    Attachments:
    Error_in_MAX.JPG ‏7 KB

    You must have the correct file extention. Here's what is wirtten in the detailed help of the function:
    output filename specifies the filename of the generated report.
    You must have the correct extension for the type of report to generate (.xml, .htm, .html, or .zip).
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • How to generate XML from SQL query

    possible ways to generate XML from SQL qury.
    i want to generate XML of following query. "Select * from emp,dep wher emp.deptno=dept.deptno"

    Hello.
    Can you try:
    SQL> set pages 0
    SQL> set linesize 150
    SQL> set long 9999999
    SQL> set head off
    SQL> select dbms_xmlgen.getxml('Select * from emp,dep wher emp.deptno=dept.deptno') from dual;
    It works fine for me.
    Octavio

  • How to generate XML Publisher report from PLSQL Stored Procedure in APPS

    Hi,
    I have concurrent program of type PLSQL Stored procedure.I need to generate XML Publisher report from the same.I have changed the output of the concurrent program as "XML" but when I tried running it,the XML tags are not generated.Due to this I am unable to create the template.Its a urgent issue.
    Please help me out .
    Thanks in advance.
    Kaveri

    Hi Kaveri
    Sadly there is nothing magic about that output field. The only program type that you can flip it to XML and then magically get XML is for Oracle Reports. For plsql you will need to recode the plsql to generate XML rather than text that you have now.
    You have some options, best option first:
    1. Move the sql to a data template - check the user guide and blog for help or
    2. Use SQL XML or XMLGEN (not great for large datasets) or
    3. Use dbms_output.put_line and write the XML file manually - not performant at all
    Regards, Tim

Maybe you are looking for