Xml loading and empty elements

Hi,
I'm having problems with Flex and xml data.
I've created an app to edit pre-existing xml files or create new xml files, which are then saved out.  The xml node structure is defined (and cannot be changed as it's widely used across the company and it's associates).
The problem is that as soon as the xml is loaded using a URLLoader class, any xml nodes that are empty are changed from:
<nodename></nodename>
to
<nodename />
This is how the data is traced out / saved, but this is useless to me as I need to keep the existing structure as the file may be edited outside of the app.
Is there a way to prevent the xml data from being changed in this way?  Adobe's own documentation even says:
'If an element contains no content, it can be written as an empty element (sometimes called a self-closing element). In XML, this element:<lastplayed/> is identical to this element: <lastplayed></lastplayed>'.
In which case, why does this get re-written all the time?
If anyone can help with this I'd be really grateful, as I just can't find a way to solve this.
Thanks,
ferdyferret

Is there really no answer to prevent this then?
ferdyferret

Similar Messages

  • Making a call over HTTPS with LoadVars, XML.load(), and WebService - Yes or No?

    Hello, do LoadVars, XML.load(), or WebService support HTTPS-based endpoints, Yes or No?
    BACKGROUND
    ============
    I've been trying to get a LoadVars to actually make a call to an HTTPS endpoint. There is nothing in the documentation that says it can't. I know that there's also XML.load() and WebService class, but from the looks of it they don't do HTTPS.
    During my tests I have absolutely no issues with making calls to the same service over HTTP. When I change it to HTTPS I don't see HTTPStatus or even failures. Also, netstat on my server will show a connection being established with the endpoint when using HTTP but not when using HTTPS. I've also tried setting SSLVerifyCertificate to "false" in my Server.xml and after a restart of AMS it doesn't help, same symptom.
    I've also googled and looked through all Adobe forum posts that I can find:
    https://forums.adobe.com/message/4938426#4938426
    https://forums.adobe.com/thread/1661461
    https://forums.adobe.com/thread/782037
    https://forums.adobe.com/message/74981
    https://forums.adobe.com/message/5107735#5107735
    https://forums.adobe.com/message/7815#7815
    https://forums.adobe.com/message/53870#53870
    https://forums.adobe.com/message/87797#87797
    WebService Class - http://stackoverflow.com/questions/5619776/webservice-and-fms
    The best I found from the posts above is a non-commital answer from adobe staff at https://forums.adobe.com/message/4938426#4938426 and a 3rd party person saying that Webservice doesn't work at http://stackoverflow.com/questions/5619776/webservice-and-fms.
    All I need is an official supported/not-supported from the Adobe staff. Shouldn't be to hard after 5 years or so of ignoring the questions in the forum right?

    Adobe, please provide some details to your current and possibly potential customers, in at least one of the many unanswered posts about making HTTPS requests from AMS.
    P.S.
    realeyes_jun,
    RealEyes Media has been an inspiration to me for many years, and I would like to thank them for their efforts to better the media streaming community.
    Also, would it be possible to please release the source to REDbug?

  • Problem with XML loading and xmlns

    I'm having a problem with loading an XML file that was created by Filemaker.  Filemaker will output an XML file using one of two different grammars.  One outputs in a mostly standard form that I can use with one glitch.  Flash CS4 AS3 seems to have a problem with the xmlns in one of the nodes.
    Specifically:
    <FMPDSORESULT xmlns="http://www.filemaker.com/fmpdsoresult">
    If I remove the xmlns="http://www.filemaker.com/fmpdsoresult" the file loads properly and I can access the various fields with no problem.  However, when I leave the xmlns=... in, it will trace out the XML properly but I can't access the fields using the code listed below.  This is driving me crazy!
    With the xmlns part in the XML file I get the following error when it tries to load the thumbnail files:
    TypeError: Error #1010: A term is undefined and has no properties.
    I need to have it so that the user can enter/edit data and simply output the XML file from Filemaker and then Flash will load up the unaltered XML file and show the info requested by the user.  That is to say I could have the user open the XML file in a word processing application and have them delete the xmlns..., but that is rather cumbersome and not very user friendly.
    I've tried every xml.ignore function I could find but it doesn't help.  Hopefully someone out there can help
    Thanks,
    -Mark-
    Partial XML:
    XML From Filemaker Export:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!-- This grammar has been deprecated - use FMPXMLRESULT instead -->
    <FMPDSORESULT xmlns="http://www.filemaker.com/fmpdsoresult">
      <ERRORCODE>0</ERRORCODE>
      <DATABASE>Sport.fp7</DATABASE>
      <LAYOUT></LAYOUT>
      <ROW MODID="1" RECORDID="1">
        <FirstName>Mark</FirstName>
        <LastName>Fowle</LastName>
        <Sport>Sailing</Sport>
        <Medal>None</Medal>
        <CourseOfStudy>Design</CourseOfStudy>
        <Year>1976-1978</Year>
        <HomeState>California</HomeState>
        <ImageName>93</ImageName>
      </ROW>
    </FMPDSORESULT>
    AS3 Code:
    import fl.containers.UILoader;
    var aPhoto:Array=new Array(ldPhoto_0,ldPhoto_1,ldPhoto_2,ldPhoto_3,ldPhoto_4,ldPhoto_5);
    var toSet:int=10;//time out set time
    var toTime:int=toSet;
    var photoPerPage:int=6;
    var fromPos:int=photoPerPage;
    var imgNum:Number;
    //var subjectURL:URLRequest=new URLRequest("testData_FM8.xml");
    var subjectURL:URLRequest=new URLRequest("Sports.xml");
    var xmlLoader:URLLoader=new URLLoader(subjectURL);
    xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
    var subjectXML:XML = new XML();
    subjectXML.ignoreWhitespace=true;
    subjectXML.ignoreComments=true;
    subjectXML.ignoreProcessingInstructions=true;
    function xmlLoaded(evt:Event):void {
        subjectXML=XML(xmlLoader.data);
        if (root.loaderInfo.bytesTotal==root.loaderInfo.bytesLoaded) {
            removeEventListener(Event.ENTER_FRAME, xmlLoaded);
            trace("XML Data File Loaded");
            trace(subjectXML);
        } else {
            trace("File not Found");
        imgNum=2;//subjectXML.ROW.length;
        trace(subjectXML);
        loadThumb(0);
    function loadThumb(startPos:int):void {
        var count:Number=aPhoto.length;
        trace(subjectXML.DATABASE);
        for (var i=0; i<count; i++) {
        try{
            aPhoto[i].source="images/"+subjectXML.ROW[startPos+i].ImageName+"_main.jpg";
        }catch (e:Error){
            trace(e);
            aPhoto[i].mouseChildren=false;
            aPhoto[i].addEventListener(MouseEvent.MOUSE_DOWN, onThumbClick);
        trace("Current mem: " + System.totalMemory);
        ldAttract.visible=false;
    function unloadThumb():void {
        var count:Number=aPhoto.length;
        for (var i=0; i<count; i++) {
            aPhoto[i].unload();
            aPhoto[i].removeEventListener(MouseEvent.MOUSE_DOWN, onThumbClick);
        trace("Current mem: " + System.totalMemory);
    function onThumbClick(evt:MouseEvent) {
        var i:Number;
        //trace("Thumbnail Clicked " + evt.target.name);
        i=findPos(evt.target.name);
        ldLrgPhoto.source="images/"+subjectXML.ROW[i+fromPos].LOCAL_OBJECT_ID+"_main.jpg";
        ldLrgPhoto.visible=true;
        btnPrev.visible=false;
        btnNext.visible=false;
        gotoAndStop("showPhoto");
    function findPos(thumb:String):Number {
        var pos:Number;
        var count:Number=aPhoto.length;
        for (var i:Number=0; i<count; i++) {
            if (thumb==aPhoto[i].name) {
                pos=i;
        return pos;

    Hi,
    I was trying to use xml namespaces, so in my application I receive an XML file from the server. The file has a namespace, so when I parse the file I need to specify the namespace:
    I got the following piece of xml:
    <ls:exchange xmlns:ls=".../tsw" xmlns:tm="http://kxa">
        <ls:projects>
             <tm:annotation id="" date="" action="getprojects" status="responseok"/>         
        <ls:project id="" name="proj" description="..." owner="asss"  release="2" />
            <ls:projectV  id="" version="" creationdate="" modificationdate=""/ >
        </ls:project>
    </ls:projects>
    </ls:exchange>
    and the following code
    <mx:VBox label="WELCOME" verticalScrollPolicy="off" horizontalScrollPolicy="off">
          <mx:Tree id="tree" dataProvider="{srv.lastResult.project}" labelField="@name"  width="300" height="100%" itemOpen="itemOpenEvt(event);" />
    </mx:VBox>
    So i want to display the content of the xml (project nodes”) in a tree view, but i don’t know how to includes the namespace"ls:" in the data provider “srv.lastResult.project”. can u help me it’s urgent.
    sincerly
    Celine

  • XML loader and UTF-16 - throws Content is not allowed in prolog

    Hi,
    Our ECC system is updated to unicode system recently. Now the iDoc downloaded from ECC is having a tag <?xml version="1.0" encoding="utf-16"?>.
    The XML Loader in the transaction throws an exception "Cannot perform action on XML document Content is not allowed in prolog. Exception: [Content is not allowed in prolog.]". If I change the encoding manually as "utf-8" and executing the transaction, it is working fine.
    Please let me know how to solve the issue.
    Thanks,
    Raman N

    Where should I enhance the webservice to make it able to handle zipped XML documents? Shouldn't take the AXIS library take care of this automatically?
    This is the web.xml document I use.
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>
    NDW2</display-name>
    <servlet>
    <display-name>
    Apache-Axis Servlet</display-name>
    <servlet-name>AxisServlet</servlet-name>
    <servlet-class>
    org.apache.axis.transport.http.AxisServlet</servlet-class>
    </servlet>
    <servlet>
    <display-name>
    Axis Admin Servlet</display-name>
    <servlet-name>AdminServlet</servlet-name>
    <servlet-class>
    org.apache.axis.transport.http.AdminServlet</servlet-class>
    <load-on-startup>100</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>AxisServlet</servlet-name>
    <url-pattern>/servlet/AxisServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>AxisServlet</servlet-name>
    <url-pattern>*.jws</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>AxisServlet</servlet-name>
    <url-pattern>/services/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>AdminServlet</servlet-name>
    <url-pattern>/servlet/AdminServlet</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
    </web-app>

  • XML load and retrive from oracle.

    Hi
    I am able to validate and load the xml file to xmltype column of database table. how can i get the inforation of each node sepeately (row wise) from sql query.
    I tried following query but giving me error.
    <?xml version="1.0" encoding="utf-8" ?>
    <caieers>
         <caieers_header>
              <file_name>eers000252.xml</file_name>
              <business_unit>CAI Common Services</business_unit>
              <sson_id>255</sson_id>
              <date>2006-12-30</date>
         </caieers_header>
         <caieers_entitlements>
              <caieers_data>
                   <soeid>in12345</soeid>
                   <role_code>read_only</role_code>
                   <role_desc>Read-only access to reports</role_desc>
                   <as_of_date>2006-12-30</as_of_date>
              </caieers_data>
              <caieers_data>
                   <soeid>pp12345</soeid>
                   <role_code>Admin</role_code>
                   <as_of_date>2006-12-30</as_of_date>
              </caieers_data>
              <caieers_data>
                   <soeid>ns12345</soeid>
                   <role_code>read_write</role_code>
                   <role_desc>Can update data</role_desc>
                   <as_of_date>2006-12-30</as_of_date>
              </caieers_data>
         </caieers_entitlements>
    </caieers>
    SELECT p.XML_DOC.extractvalue('/caieers/caieers_header/file_name/text()').getstringval() as File_name,
    p.XML_DOC.extract('/caieers/caieers_header/business_unit/text()').getstringval() as Business_unit,
    p.XML_DOC.extract('/caieers/caieers_header/sson_id/text()').getstringval() as sson_id,
    p.XML_DOC.extract('/caieers/caieers_header/date/text()').getstringval() as Dateoffile,
    p.XML_DOC.extract('/caieers/caieers_entitlements/caieers_data//soeid/text()').getstringval() as soeid,
    p.XML_DOC.extract('caieers/caieers_entitlements/caieers_data//role_code/text()').getstringval() as role_code,
    p.XML_DOC.extract('caieers/caieers_entitlements/caieers_data//role_desc/text()').getstringval() as role_desc,
    p.XML_DOC.extract('caieers/caieers_entitlements/caieers_data//as_of_date/text()').getstringval() as asofdate
    FROM test p,
    table(xmlsequence(extract(value(mat),'/caieers/caieers_entitlements/caieers_data'))) ctb
    ERROR at line 10:
    ORA-00904: "MAT": invalid identifier
    Aslo if anybody help me to find best way to load this file in relational table (at present it was loaded as xmltype column)
    Thanks a lot
    Regards
    Raju

    Try this example
    I"ve modified the XML Schema to automatically create the table during schema registration.
    SQL>
    SQL>
    SQL> var schemaURL varchar2(256)
    SQL> var schemaPath varchar2(256)
    SQL> --
    SQL> begin
      2    :schemaURL := 'http://www.w3.org/2001/XMLSchema/CAIEERS.xsd';
      3    :schemaPath := '/public/CAIEERS.xsd';
      4  end;
      5  /
    PL/SQL procedure successfully completed.
    SQL> call dbms_xmlSchema.deleteSchema(:schemaURL,4)
      2  /
    Call completed.
    SQL> declare
      2    res boolean;
      3    xmlSchema xmlType := xmlType(
      4  '<?xml version="1.0" encoding="utf-8"?>
      5  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xdb:storeVarrayAsTable="true">
      6     <xsd:element name="caieers" type="caieers_type" xdb:defaultTable="caieers_tb"/>
      7     <xsd:complexType name="caieers_type">
      8             <xsd:sequence>
      9                     <xsd:element name="caieers_header" type="caieers_header_type"/>
    10                     <xsd:element name="caieers_entitlements" type="caieers_entitlements_type"/>
    11             </xsd:sequence>
    12     </xsd:complexType>
    13     <xsd:complexType name="caieers_entitlements_type">
    14             <xsd:sequence>
    15                     <xsd:element name="caieers_data" type="caieers_data_type" maxOccurs="unbounded"/>
    16             </xsd:sequence>
    17     </xsd:complexType>
    18     <xsd:complexType name="caieers_header_type">
    19             <xsd:sequence>
    20                     <xsd:element name="file_name" type="xsd:string"/>
    21                     <xsd:element name="business_unit" type="xsd:string"/>
    22                     <xsd:element name="sson_id" type="xsd:integer"/>
    23                     <xsd:element name="date" type="xsd:date"/>
    24             </xsd:sequence>
    25     </xsd:complexType>
    26     <xsd:complexType name="caieers_data_type">
    27             <xsd:sequence>
    28                     <xsd:element name="soeid" type="soeid_type"/>
    29                     <xsd:element name="role_code" type="role_code_type"/>
    30                     <xsd:element name="role_desc" type="role_desc_type" minOccurs="0"/>
    31                     <xsd:element name="as_of_date" type="xsd:date"/>
    32             </xsd:sequence>
    33     </xsd:complexType>
    34     <xsd:simpleType name="soeid_type">
    35             <xsd:restriction base="xsd:string">
    36                     <xsd:pattern value="[a-zA-Z]{2}\d{5}"/>
    37             </xsd:restriction>
    38     </xsd:simpleType>
    39     <xsd:simpleType name="role_code_type">
    40             <xsd:restriction base="xsd:string">
    41                     <xsd:maxLength value="30"/>
    42             </xsd:restriction>
    43     </xsd:simpleType>
    44     <xsd:simpleType name="role_desc_type">
    45             <xsd:restriction base="xsd:string">
    46                     <xsd:maxLength value="255"/>
    47             </xsd:restriction>
    48     </xsd:simpleType>
    49  </xsd:schema>
    50  ');
    51  begin
    52    if (dbms_xdb.existsResource(:schemaPath)) then
    53      dbms_xdb.deleteResource(:schemaPath);
    54    end if;
    55    res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    56  end;
    57  /
    PL/SQL procedure successfully completed.
    SQL> begin
      2    dbms_xmlschema.registerSchema
      3    (
      4      :schemaURL,
      5      xdbURIType(:schemaPath).getClob(),
      6      TRUE,TRUE,FALSE,TRUE
      7    );
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> declare
      2    xmldoc xmltype := xmltype(
      3  '<?xml version="1.0" encoding="utf-8"?>
      4  <caieers>
      5     <caieers_header>
      6             <file_name>eers000252.xml</file_name>
      7             <business_unit>CAI Common Services</business_unit>
      8             <sson_id>255</sson_id>
      9             <date>2006-12-30</date>
    10     </caieers_header>
    11     <caieers_entitlements>
    12             <caieers_data>
    13                     <soeid>in12345</soeid>
    14                     <role_code>read_only</role_code>
    15                     <role_desc>Read-only access to reports</role_desc>
    16                     <as_of_date>2006-12-30</as_of_date>
    17             </caieers_data>
    18             <caieers_data>
    19                     <soeid>pp12345</soeid>
    20                     <role_code>Admin</role_code>
    21                     <as_of_date>2006-12-30</as_of_date>
    22             </caieers_data>
    23             <caieers_data>
    24                     <soeid>ns12345</soeid>
    25                     <role_code>read_write</role_code>
    26                     <role_desc>Can update data</role_desc>
    27                     <as_of_date>2006-12-30</as_of_date>
    28             </caieers_data>
    29     </caieers_entitlements>
    30  </caieers>');
    31  begin
    32    xmldoc := xmldoc.createSchemaBasedXML(:schemaURL);
    33    insert into "caieers_tb" values ( xmldoc );
    34  end;
    35  /
    PL/SQL procedure successfully completed.
    SQL> set autotrace on explain pages 0 lines 150 long 1000
    SQL> --
    SQL> select extractValue(value(p),'/caieers/caieers_header/file_name') FileName,
      2         extractValue(value(p),'/caieers/caieers_header/business_unit') Business_unit,
      3         extractValue(value(p),'/caieers/caieers_header/sson_id')  sson_id,
      4         extractValue(value(p),'/caieers/caieers_header/date')  Dateoffile,
      5         extractValue(value(ctb),'/caieers_data/soeid') soeid,
      6         extractValue(value(ctb),'/caieers_data/role_code') role_code,
      7         extractValue(value(ctb),'/caieers_data/role_desc') role_desc,
      8         extractValue(value(ctb),'/caieers_data/as_of_date') as asofdate
      9    FROM "caieers_tb" p,
    10   table (xmlsequence(extract(value(p),'/caieers/caieers_entitlements/caieers_data'))) ctb
    11  /
    eers000252.xml
    CAI Common Services
           255 30-DEC-06
    in12345
    read_only
    Read-only access to reports
    30-DEC-06
    eers000252.xml
    CAI Common Services
           255 30-DEC-06
    pp12345
    Admin
    30-DEC-06
    eers000252.xml
    CAI Common Services
           255 30-DEC-06
    ns12345
    read_write
    Can update data
    30-DEC-06
    Execution Plan
    Plan hash value: 3549528997
    | Id  | Operation          | Name               | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |                    |     3 | 19983 |   805   (1)| 00:00:10 |
    |   1 |  NESTED LOOPS      |                    |     3 | 19983 |   805   (1)| 00:00:10 |
    |*  2 |   TABLE ACCESS FULL| caieers_tb         |     1 |  4056 |     3   (0)| 00:00:01 |
    |*  3 |   INDEX RANGE SCAN | SYS_IOT_TOP_379781 |     3 |  7815 |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - filter(SYS_CHECKACL("ACLOID","OWNERID",xmltype('<privilege
                  xmlns="http://xmlns.oracle.com/xdb/acl.xsd"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://xmlns.oracle.com/xdb/acl.xsd
                  http://xmlns.oracle.com/xdb/acl.xsd DAV:http://xmlns.oracle.com/xdb/dav.xsd"><rea
                  d-properties/><read-contents/></privilege>'))=1)
       3 - access("NESTED_TABLE_ID"="caieers_tb"."SYS_NC0001900020$")
           filter("SYS_NC_TYPEID$" IS NOT NULL)
    Note
       - dynamic sampling used for this statement
    SQL>
    SQL>
    SQL>

  • Photoshop files locking up Finder (preview not loading) and empty photoshop files... 18mb!

    Hi all,
    We've been having some problems with all of our Photoshop files recently. It seems to be a problem that's been duplicated throughout during the design progression.
    When using finder to navigate through our design folders, it often locks up for 5 - 10 seconds per file while finder tries to load the preview thumbnails (and fails, showing just the psd icon). I checked compatibility was checked on save as. I also checked the colour profile was being embedded. On some files it wasn't so I checked this, but still having the same slowdown.
    As a test I then deleted all the layers in the doc, saved it again - and even though the file only had one blank layer - it was 18mb in size!
    I then made a new document of the same resolution, saved it - and boom. 120kb or so and preview works fine.
    I then opened one of the problem PSD's with all the layers - dragged them over to a new document of the same size, saved it - and the file and preview in finder works fine.
    Obviously there's something of around 18mb in weight in all of our old files that is causing a real issue with finder and previews. Other than layers (as there are none) - what could it be? We're using a mix of cs6 / cc and cc 2014.
    Any help on this would be appreciated!

    OK, that means that the Finder is having problems with that folder. That could be due to corrupt disk data structures, or you could be hitting some of the known (and not yet fixed) bugs in MacOS's Finder related to thumbnails and metadata parsing.
    As for file size - other metadata (especially image history, and sometimes color profiles) can really add to the file size.

  • Parse file without xml specification or document element

    I have a large (600mb) log file that is in xml format but it does not have an xml specification and has no document element.
    file looks like this:
    <message>...</message>
    <message>...</message>
    <!-- ... many many many more <message> elements -->
    <message>...</message>
    <message>...</message>
    I have written a class that overrides the SAX DefaultHandler but now want to be able to parse the document without having to add the xml spec and document element manually.
    I've thought about writing a subclass of FileReader that adds the xml specification and document element before reading physical file but would also need to add closing document element at end of file.
    Is there a simpler way?

    Hi,
    There is another way around the problem of adding a missing root node. This involves adding an extra DTD file and a xml file, like this one:
    <?xml version='1.0' encoding='UTF-8' standalone="no"?>
    <!DOCTYPE messageSet SYSTEM "logfile.dtd"
    [<!ENTITY data SYSTEM "logfile.xml">]
    >
    <messageSet>
    &data;
    </messageSet>
    This file "includes" the logfie.xml, as an external entity, with your messages as child nodes of element messageSet.
    In your program you refer to this xml file when parsing the messages.

  • Library of flash files, loading, and data assignment?

    Hi; noob here...
    Here is what I want to accomplish:
    what little flash I know makes me just dangerous enough to
    want to be able to have either a database of vector information, or
    a .fla library of shapes (or symbols, I don't know) that represent
    counties, districts, states, watersheds (and such) of the USA.
    These can be loaded singly (for example if we want only to show the
    state of Maine, and not all of the US on a single demo) and
    assembled into separate layers and either loaded as or turned into
    symbols.
    These symbols then are altered (re-colored, shifting
    transparency, even moving, shrinking or exploding, or, as a blob,
    being panned in one direction or another) whenever certain buttons
    are pressed that load new XML data. For example, let us say that
    Oxford County in Maine has a 2% native american population, and
    Penobscot County has 4%... both had been loaded by actionscript and
    imported into the demonstration. Then, we change the color of those
    two counties to whatever color we would want to represent that one
    is 2% and the other 4%. Then, on another click or menu selection
    within the flash document, those values are dismounted, and new XML
    loaded and applied to the same symbols... and later on, these
    county symbols might be unloaded and new ones (for new hampshire or
    california or whole u.s., who knows) mounted.
    What I'm hoping people can tell me is what these processes
    might be called, or link me to tutorials that cover similar
    concepts, or otherwise point me to documentation or give
    suggestions on how I might tackle this. I keep scouring the
    internets (hehe) in search of similar things, but I don't even have
    the correct terminology to do an accurate search. Such just knowing
    what to search for may be of great help! Thanks in advance.

    unfortunately Flash does not hold an autosave file for you
    (actually most software doesn't do this - to my knowledge only
    Microsoft Office and a couple of others do)

  • XML.load specific port

    Hi,
    I'm trying to load an xml file from
    http://127.0.0.1:8080/foo --
    but it seems that the port is stripped from the call. Is that so?
    The target is FL2 on a Nokia 6630, but I've only access to the
    emulator (Flash 8) right now.
    I get the following trace output:
    Problem loading URL (
    http://127.0.0.1/foo). [from the
    emulator]
    Connection failed:
    http://127.0.0.1:8080/foo [my
    own trace output of the host address]
    The browser has no problem loading the URL. I've looked in
    the FL2 API ref docs but didn't find any mention of ports being
    unavailable.
    Any suggestions?
    Regards,
    Martin

    Hi Martin.
    I just finished running after this issue as well. I can only
    confirm your findings.
    - Both XML.load() and LoadVars.load() request seem remove any
    :Port reference from the requested URI.
    - The request
    http://127.0.0.1:9090/anthing
    actually is caught at 127.0.0.1:80
    - When I change publish setting to Flash Player 8, the ports
    are interpreted correctly, and the request is sent to :9090.
    On the upside - this seems to be true only for the PC
    environment. The ports are interpreted properly on my phone (Nokia
    N70).
    On the upside

  • Dynamically create empty mcs and asign elements from array and loadmovie

    I'm creating an educational game for my school students.
    A little boy is flying through the city when he encounters objects flying from left to right.
    He hears a SOUND eg: Dog - he must go and click the dog image with the flying cursor. There are at least 5 DIFFERENT objects that should be flying on the screen. There could be various of them at any one time.
    I have the roots of the images in an xml file. And the actual swf are in a file called IMAGE and the sounds in SOUND.
    My problem is that most tutorials I see use the attachmovie method but I don't want to put all the swf's in the library as there are hundreds.
    I have to use the loadmovie method.
    I take it I have to loop through the array and assign each element to an empty movieclip which in turn is in the loop so you get 5 empty clips - I will use i (index). It doesn't seem to be working. I shall keep trying and post back here if I get any luck but I'm running out of ideas.
    Then the objects have to float across the screen. Don't know whether to use tween object or onEnterFrame handler or other. AND someone has mentioned using setinterval to "spit out" the objects.
    BUT if I have five flying across the screen I'm left without clips to stick in any more.
    Oh my head hurts but I will keep going.
    CHEERS if any help is around. This should be quite a standard thng for game developpers. Code at the moment
    function loadEnemies():Void {
    enemy_xml = new XML();
    enemy_xml.ignoreWhite = true;
    enemy_xml.onLoad = function(success:Boolean) {
    if (success) {
    _root.parseEnemyXML();
    //enemy_xml.load("level_"+level+".xml");
    enemy_xml.load("data/animal_catch.xml");
    function parseEnemyXML():Void {
    rows = enemy_xml.firstChild.childNodes.length;
    for (var i:Number = 0; i<rows; i++) {
    var row_string:String = String(enemy_xml.firstChild.childNodes[i].firstChild.firstChild);
    _root["row_"+i+"_array"] = row_string; //MAIN ARRAY holds an array images/dog_a.swf/ images/cat_a.swf etc... all five
    _root.createEmptyMovieClip("enemyObjects", 1);
    enemyObjects.createEmptyMovieClip("holder_"+i, i);
    _root["object"+i] = new Sound(enemyObjects["holder_"+i]);
    trace(row_string);
    loadMovie["row_"+i+"_array"], ["holder_"+i]
    if (level == 1) {
    alerts_mc.play();
    } else {
    currRow = 0;
    rowCounter = 0;
    OK got to about here BUT
    a. I started to get confused around the createEmptyMovieClip part
    b. I KNOW I shouldn't have Sound(enemyObjetcs etc... BUT I copied the code from a tutorial and I don't know what to replace it with.
    I'm close but I need a little polishing.

    It doesn't do you much good to work with borrowed code that you do not understand.  Your best bet will be to start small, creating one functional piece of the puzzle at a time, and work your way up.  Start with making sure you are loading and parsing the xml properly, then set about loading the external content, then see about making that content move around, etc...
    In the code you show, your loadMovie line of code does not resemble anything I have seen before, looking more like (but not quite like) a multi-dimensional array element than a loadMovie() function call.  If you find you need to have control of the items as soon as they load, then you should consider using MovieClipLoader.loadClip instead of loadMovie.  The MovieClipLoader class provides features, such as to be able to determine when items have fully loaded.

  • How can I load and process an HTML5 file with Javascript in the same way as an XML file?

    I maintain a diary in local weekly files that I am converting to HTML5 from XHTML. I wish to extract all the "articles" about particular topics from these files and display them in different orders. It is possible to load an XHTML file using the loadXMLDoc function described at http://www.w3schools.com/dom/dom_loadxmldoc.asp but the same function detects a parsing error when it reads an HTML5 file. (For example, the parser expects an empty element's tag to end with />). How do I persuade Firefox 16.0.1 to use an appropriate parser?

    A good place to ask advice about web development is at the MozillaZine "Web Development/Standards Evangelism" forum.
    *http://forums.mozillazine.org/viewforum.php?f=25
    The helpers at that forum are more knowledgeable about web development issues.<br>
    You need to register at the MozillaZine forum site in order to post at that forum.

  • Loading xml file and parsing error in web start

    Hello,
    I load a xml file from jar file, but i have a error at parsing see :
    ClassLoader cl= this.getClass().getClassLoader();
    File file = new File(cl.getResource("paradise/test/maquette/parser/areas.xml").getFile());
    parseur.parse(new InputSource(new FileInputStream(file)), this);
    the file opening but at parseur.parse() i have a path error with :
    http:// . . . . \Paradise_client\paradise.jar!\paradise\test\maquette\parser\areas.xml , bad name of directories .....
    Can you help me ? please :-(

    I need to do a similar thing but in my case I don't know the structure of the xml file. I have 2 questions for this mapping. For an xml file like this:
    <?xml version="1.0"?>
    <catalog>
    <book id="bk101">
    <author>Gambardella, Matthew</author>
    <title>XML Developer's Guide</title>
    <genre>Computer</genre>
    <price>44.95</price>
    <publish_date>2000-10-01</publish_date>
    <publisher>Dummy Publisher Co.</publisher>
    <publisher_address>
    <city>London</city>
    <street>Heart St.</street>
    <no>23/5</no>
    </publisher_address>
    <description>An in-depth look at creating applications
    with XML.
    </description>
    </book>
    </catalog>
    If I'm right, I need to create a database named catalog and a table named book. But the problem comes out here: How can i store publisher_address? In a table or what? Other problem is, is there a difference between storing id attribute of the book and genre element of the book? I think they are just columns of the book table. But if I'm wrong what is the correct solution?

  • Loading XML file with missing elements dynamically through ODI

    Hi Guys ,
    I have the below xml file with two nodes Employee and Address. On a daily basis , sometimes the address element might not come in from the source xml file , but my interface has columns mapped to address elements, and hence it can fail due to the source element not being found in the file or data might not get loaded due to the 'and' condition in the sql query 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 the elements (Employee) present and load data only for those elements dynamically?
    XML File:
    <?xml version="1.0" encoding="UTF-8" ?>
    <EMP>
    <Empsch>
    <Employee>
    <EmployeeID>12345</EmployeeID>
    <Initials>t</Initials>
    <LastName>john</LastName>
    <FirstName>doe</FirstName>
    </Employee>
    <Address>
    <WorkPhone>12345</WorkPhone>
    <WorkAddress>Test 234</WorkAddress>
    </Address>
    </Empsch>
    </EMP>
    Thanks ,
    Revanth Tambisetty

    I was able to resolve it by using left outer joins and referring the table structure from the XSD

  • Loading and parsing XML

    what is the best method for loading external XML (with
    inherent HTML) content into Flash and into the TextArea component?
    here is the requirement:
    i have an image loader and a TextArea together on the screen.
    a "story" is loaded which will present a series of images (in the
    image loading) associated with a corresponding text (in the
    TextArea). a "story" has multiple image/text sections that are
    navigatied through with FRWD/BACK buttons. any given section can
    also have multiple sub-sections or "frames".
    here is a diagram of the flow (in this case there would be 5
    click throughs: 5 text/image sequences, but all contained only
    within 4 sections):
    http://jalaka.com/lab/ia/story_nav.jpg
    below is my proposed sample XML structure. i want Flash to
    recognize how many sections and frames within sections there are in
    each story XML document - in order to generate a corresponding
    navigation structure (a tab for each section). HTML content will be
    immediate availble to loadinto TextArea as user move forward in
    sequence with nav. and images references can also be preloaded into
    available MC containers to be swapped into place as user navigates
    forward in sequence. also need to read and store attributes for
    each node in the XML to come up in MCs in sequence. and must also
    be able to parse XML in a way to place simple HTML formatted
    content (within XML) into the TextArea.
    would Arrays be used?
    <story title = "Story Title">
    <section num = "1" title = "Section One Title" >
    <frame image = "1.jpg" caption = "caption text
    here"><b>Content</b><br><br>content
    content content</frame>
    </section>
    <section num = "2" title = "Section Two Title" >
    <frame image = "1.jpg" caption = "caption text
    here"><b>Content</b><br><br>content
    content content</frame>
    <frame image = "2.jpg" caption = "caption text
    here"><b>Content</b><br><br>content
    content content</frame>
    </section>
    </story>

    Placing the XML into an array is a great plan. What you want
    is each array element to be an object containing the section data.
    Another plan is to use a List or Combox component. Again each
    data property element would be an object containing the section
    data.

  • Swapping xml loaded Images to scene elements?

    Hi there!
    I have a small quick question about xml loaded images.
    Can you append/attach/swap the images to elements in your scene?
    I would like to manually animate a movieclip using keyframes and motion tweens. For example, to have a movieclip FLY! accross the screen! lol But I want the image on it to be of one that has been dynamically loaded.
    I can't seem to work out how to replace an image on a movieclip from a dynamically loaded image.
    Is it even possible?
    Thanks heaps for your time you guys!

    If the original image is the only object within the movieclip, you can use removeChildAt(0) to get rid of it, and use addChild(your_new_image) to replace it.

Maybe you are looking for

  • Help needed with Map function in Lumira

    Hi, I've bee using Luira for lots of great tile charts and bar charts, but now I am looking to make use of the mapping visulization in Lumira. Bascially I want to get a count of the number of retail stores by state.  I uploaded my data , and some hav

  • Does not display in iTunes -- How can I restore it?

    I have not used my Nano for a while, and I upgraded to Leopard from Tiger since. I just plugged in my Nano and it briefly shows up in iTunes though it gives me a message that it was not properly disconnected and it disappears and in a minute or so it

  • Skip Blank Values in Import-CSV

    I am attempting to do a mass import of user attributes (phone number, address, city, state, zip code, title, company). All goes well until I hit a blank value in the CSV. Here is the Powershell script I am trying to use. Import-Csv IA-Test2.csv | For

  • Missing Option "Hidden" in WebDAV Repository

    Hi there, we create a WebDAV-Repository and connect a WebDAV to EP7.0 SPS12. On this WebDAV there are existing folders. If we want to change the properties of an existing folder and modify the description, we got an error after click on "Save". The e

  • An error occured when trying to connect to itunes

    when i click on store to start it so i can download digital copies of movies it says i cannot connect to a network. my internet is up and working(as i can connect to post this) and it wont connect me to the store.