XML as target

Hello,
Does the option "case_sens" work. With everything lower case, nothing, upper case no
problem.
And do I have to use "case_sens" as used in the example XML_GEO_DIM or "cs" as
described in the Oracle Data Integrator User's Guide.
kind regards,
Frans.

u may ignore this cs.
as per my exp,i havent noticed any change with/without using this cs

Similar Messages

  • Using of xml as target in transforms

    Hi all,
    I am new to BODS and still exploring its features.
    I am looking into the finance rapid marts and found in few fact table that xml is used as a target.
    I am not sure what is the reason of using xml as target, how does it helps in improving any performance of the transform?
    Can anybody throw some light on this.
    Thanks
    Gaurav

    u may ignore this cs.
    as per my exp,i havent noticed any change with/without using this cs

  • Re: XML as Target

    Hi all,
    Can u give me the step by step procedure to use XML as Target from Oracle table .
    Please tell me how to configure it in Topology manager also .
    Thanks in Advance .

    step 1: create an sample xml file as u wan the xml to generated
    step 2: In topology manager select XML data server and insert a new data service
    select JDBC drive as : com.sunopsis.jdbc.driver.xml.SnpsXmlDriver
    URL : jdbc:snps:xml?f=C:\test.xml&s=test01
    in the above url f is the path of ur xml and &s is the schema name
    test the connection...if u get the test completed successfully message then give the logical schema name and context and also select ur schema and work schema's
    step 3: create a model and give the connection to the data server and reverse the xml in to ur model
    step 4: now u can create an interface and drag ur xml as target and map the xml column
    select ikm as sql control append
    step 5: once ur done with this interface create a procedure in which give the command like
    create xmlfile "<target xml file name with path>" from schema <schema name>
    step 6: create a package and drag the interface in to the package after that drag the procedure and run the interface first then procedure.
    after this xml file will be generated ...

  • XML multiple targets problem

    there is an example in oracle warehouse builder user's guide how to load xml file into multiple tables (1:N relationship).
    Let's have an xml file:
    <orders>
    <order>
    <id>1</id>
    <items>
    <item>
    <product>a</product>
    </item>
    </items>
    </order>
    </orders>
    but what if one day you get an xml file where an order has no items:
    <orders>
    <order>
    <id>10</id>
    </order>
    </orders>
    I get an error message: ORA-20011: Error occurred while loading source XML document into the target database object XXX . Base exception: No rows to modify -- the row enclosing tag missing. Specify the correct row enclosing tag.
    What I want is to load in order table one row, and no rows in items table.
    The xsl for this small example that makes a problem looks like (the rest is like in oracle warehouse builder user's guide example in C appendix):
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <ROWSET>
    <xsl:for-each select="orders/order/items/item">
    <ROW>
    <ORDER_ID>
    <xsl:value-of select="../../id"/>
    </ORDER_ID>
    <PRODUCT>
    <xsl:value-of select="product"/>
    </PRODUCT>
    </ROW>
    </xsl:for-each>
    </ROWSET>
    </xsl:template>
    </xsl:stylesheet>

    Sounds like you've missed some tag from the files.
    For XML processing I would look at leveraging XDB, see the post here;
    http://blogs.oracle.com/warehousebuilder/2007/09/leveraging_xdb.html
    Cheers
    David

  • Open xml relationship target is NULL when inserting chart

    Hi,
    I have looked into the specification ISO/IEC 29500-1:2012 and i understand that the attribute Target for the element Relationship can be set to NULL at times(Empty header and footer in the specification).
    Now, i have stumbled on Target being NULL also when inserting a diagram into a word document. For example:
    <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"
    Target="NULL" TargetMode="External" xmlns="http://schemas.openxmlformats.org/package/2006/relationships" />
    I'm using Open xml sdk and i'm trying to create a relationship. My question is how i should resolve the target which i think should point to the diagram/chart that i inserted.
    Br,
    /Peter
    Peter

    Hi Cindy,
    It is "easy" to reproduce :)
    1. Create a word document
    2. Add a CustomXml to the document with for example "Word content control toolkit"
    2:1 The CustomXml should look something like this <Root xmlns=http://schemas.company.se><Description></Description></Root>
    3. Open up the word document and open up the "XML Mapping Pane" under Developer tab. Add rich text content control which mapps to the <Description> element.
    4. Save and close the document
    5. Take a copy of thedocument
    6. Open up the document again, place the insert point within the content control mapped to <Description> element and insert a Chart.
    7. Save and close the document
    8. Rename the document with the extension .zip and navigate to word/charts/_rels/ and open up chart2.xml.rels.
    9. Search for Target="NULL", you should find 1 occurrence
    You can also download a sample here: http://1drv.ms/1raxoUr
    Br,
    /Peter
    Peter

  • XML as target file - how can i change its character set?

    Hi all,
    i need to create my target as XML-file und to save all my information there, but with other character set (not with default). In other words i must have in XML-file in header
    <?xml version="1.0" encoding="ISO-8859-15"?>.
    Now i have
    <?xml version="1.0"?>.
    What can i do?
    Thanks in advance.

    I don't think Finder does this (I've tried).
    iTunes does though. Where you can set artwork or the "poster frame"...
    This may not be what you want but if it helps, I know 2 ways  do this is
    Open the video in QuicktimePlayer7 | View | Set Poster Frame (even then, you might need to save it as .mov (ie in a 'mov container').
    Drag the file into iTunes and set the artwork (as in http://www.dummies.com/how-to/content/adding-album-cover-art-or-images-in-itunes .html)
    From there, iTunes will use that frame as the "poster frame" ie the photo/frame that shows when you browse your videos. Which is what you want, but limited to iTunes.
    When I do either of these above, the frame I set does not show when exploring files in "Finder" (or in the other Explorer tool I use called "Pathfinder").
    So it maybe, that exactly what you want, is not possible.

  • Open xml relationship target is NULL when inserting chart into a mapped rich text content control in Word 2013

    Hi,
    I have a word document with a rich text content control that is mapped to a CustomXml. You can download an example here
    http://1drv.ms/1raxoUr
    I have looked into the specification ISO/IEC 29500-1:2012 and i understand that the attribute Target for the element Relationship can be set to NULL at times(Empty header and footer in the specification).
    Now, i have stumbled on Target being NULL also when inserting a diagram into a word document. For example:
    <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"
    Target="NULL" TargetMode="External" xmlns="http://schemas.openxmlformats.org/package/2006/relationships" />
    Why is Target="NULL" and how should i interpret that Target is null?
    Br,
    /Peter
    Peter

    Hello Peter,
    The relationship in question is associated with the externalData element (ISO/IEC 29500-1:2012 §21.2.2.63). For the other two charts in this document, the corresponding relationships are of the other allowable form:
      <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/package" Target="../embeddings/Microsoft_Excel_Worksheet1.xlsx"/>  <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/package" Target="../embeddings/Microsoft_Excel_Worksheet2.xlsx"/>
    For charts 1 and 3 in your document, the data can be edited via the Chart Tools ribbon control. The option to edit data is not available for chart 2. The data used to create chart 2 is the same default spreadsheet data used for chart 1, and in fact the spreadsheet
    references are still present in the file format, despite there being no apparent link to a spreadsheet for chart 2.
    Thus, it appears that Target="NULL" in this context means that the chart is not associated with an external data source. The specification doesn't have much to say about the semantics of the Target attribute (ISO/IEC 29500-2:2012 §9.3.2.2) beyond
    the fact that it be a valid xsd:anyURI, which the string "NULL" is.
    It looks like there is some unexpected interaction between the chart and the content control. I don't think the file format is the issue. You will probably need to pursue that behavior from the product perspective via a support incident, if that behavior
    is unexpected. If you still have questions about what is seen in the file format, please let me know.
    Best regards,
    Matt Weber | Microsoft Open Specifications Team

  • XML not loading in SWF

    Please, please someone help. I have been at this for days and can't see the woods for the trees any more.
    I have a swf embedded in a htm file. I pass FlashVars to it with a view to setting colours for symbols already in the swf.
    No matter what I do I simply cannot get the xml loaded. Can someone help and have a look at the following code and tell me where I am going wrong.
    I am using Flash CS4/AS 3. The default class is com.main and all .AS files are located in a folder 'com' within the root. All fla. .swf and  .xml files are located in the root.
    TIA
    Default.htm
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
    </head>
    <body>
    <p>Hello World!</p>
        <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="550" HEIGHT="400" id="8 - WHN Sixth Floor.swf" ALIGN="">
        <param name="allowScriptAccess" value="sameDomain" />
        <PARAM NAME=movie VALUE="8 - WHN Sixth Floor.swf">
        <PARAM NAME=quality VALUE=high>
        <PARAM NAME=bgcolor VALUE=#FFFFFF>
        <PARAM NAME="FlashVars" value="xmlfile=myxml2.xml" />
        <EMBED FlashVars="xmlfile=myxml2.xml" width="550" height="400" src="8 - WHN Sixth Floor.swf" allowScriptAccess="sameDomain" quality=high bgcolor=#FFFFFF NAME="8 - WHN Sixth Floor.swf" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
        </OBJECT>   
    </body>
    </html>
    Main.as
    package com
    import com.*;
    import flash.display.MovieClip;
    import flash.display.SimpleButton;
    import flash.text.TextField;
    import flash.display.Stage;
    import flash.display.LoaderInfo;
    import flash.events.*;
    public class main extends MovieClip
      public var gx:getXML;
      public var xmlFileName:Object;
      public function Main()
       //addEventListener( Event.ADDED_TO_STAGE, init );
       init();
      private function init():void 
       //removeEventListener( Event.ADDED_TO_STAGE, init )
       //var xmlFileName:Object = stage.loaderInfo.parameters;
       var gx:getXML = new getXML("myxml2.xml");
       addChild(gx);
    getXML.as
    package com
      // Static Class
      import com.*;
      import flash.display.SimpleButton;
      import flash.xml.XMLDocument;
      import flash.xml.XMLNode;
      import flash.xml.XMLNodeType;
      import flash.events.*;
      import flash.net.URLLoader;
      import flash.net.URLRequest;
      import flash.net.URLVariables;
      import flash.net.URLRequestMethod;
      import flash.geom.ColorTransform;
      import flash.net.navigateToURL;
      import flash.system.fscommand;
      public class getXML extends SimpleButton
       public var xmlData:XML;
        public function getXML(xmlurl:String):void
         var loader:URLLoader = new URLLoader();
         loader.addEventListener(Event.COMPLETE, LoadXML);
           var urlReq:URLRequest = new URLRequest(xmlurl);
            //urlReq.method = URLRequestMethod.POST;  
            //var variables:URLVariables = new URLVariables();
            //urlReq.data = variables;
            //try {  
                      loader.load(urlReq);
                  //} catch (error:Error) {  
                      //trace ("Unable to load requested document.");  
        public function LoadXML(e:Event):void
         xmlData = new XML(e.target.data);
         //xmlData = new XML("myxml2.xml");
         var rslt:XMLDocument = new XMLDocument();
         rslt.ignoreWhite = true;
         rslt.parseXML(xmlData.toXMLString());
         //trace(result.firstChild.childNodes.length);
         for (var i=0; i<rslt.firstChild.childNodes.length; i++)
          staticClass.head_Array.push(xmlData.data[i].head);
          staticClass.color_code_Array.push(xmlData.data[i].colorcode);
          staticClass.url_Array.push(xmlData.data[i].url);
          staticClass.note_Array.push(xmlData.data[i].mc_name + "##" + xmlData.data[i].note);
          staticClass.mc_Array.push(xmlData.data[i].mc_name);
         var k = staticClass.mc_Array.length  
         var j = 0;
         for each (var val:String in staticClass.mc_Array)
          var btn:SimpleButton = SimpleButton(this.parent.getChildByName(val));
          if (btn != null)
           var rojo:ColorTransform = new ColorTransform();
           rojo.color = uint (staticClass.color_code_Array[j]);    
           btn.transform.colorTransform = rojo;
           btn.addEventListener(MouseEvent.CLICK, onClick);
           btn.addEventListener(MouseEvent.MOUSE_OVER, onOver);
           btn.addEventListener(MouseEvent.MOUSE_OUT, onOut);
           * Set mouse over separate colour
           btn.alpha = 3;
          j++;
         function onClick(e:MouseEvent )
          trace(e.currentTarget.name + "----" + staticClass.url_Array[e.currentTarget.name.substring(7, e.currentTarget.name.length)-1]);
          if(staticClass.url_Array[0] != "None")
           navigateToURL(new URLRequest(staticClass.url_Array[0] + "?Room=" + e.currentTarget.name), "_self");
          else
           fscommand("RoomType", e.currentTarget.name);
         function onOut(e:MouseEvent )
          e.currentTarget.parent.getChildByName("HoverText").text = "";
          e.currentTarget.alpha = 3;
         function onOver(e:MouseEvent )
          e.currentTarget.alpha = 1.5;
          for each (var val:String in staticClass.note_Array)
           if(e.currentTarget.name == val.substring(0, val.indexOf("##", 0)))
            e.currentTarget.parent.getChildByName("HoverText").text = val.substring(val.indexOf("##", 0) + 2, val.length);
            //e.currentTarget.parent.getChildByName("HoverText").text = "HELP ME";
    staticClass.as
    package com
    import flash.display.MovieClip;
    public class staticClass
       public static var head_Array:Array = new Array();
       public static var color_code_Array:Array = new Array();
       public static var url_Array:Array = new Array();
       public static var note_Array:Array = new Array();
       public static var mc_Array:Array = new Array();
       public static var url_Array1 :Array = new Array();

    i don't think you're using Main or you would see error messages.
    what's the following trace() reveal:
    oh, i can see an error in Main, too:
    Main.as
    package com
    import com.*;
    import flash.display.MovieClip;
    import flash.display.SimpleButton;
    import flash.text.TextField;
    import flash.display.Stage;
    import flash.display.LoaderInfo;
    import flash.events.*;
    public class main extends MovieClip   // main should be Main
      public var gx:getXML;
      public var xmlFileName:Object;
      public function Main()
    trace(this)
       //addEventListener( Event.ADDED_TO_STAGE, init );
       init();
      private function init():void 
       //removeEventListener( Event.ADDED_TO_STAGE, init )
       //var xmlFileName:Object = stage.loaderInfo.parameters;
       var gx:getXML = new getXML("myxml2.xml");
       addChild(gx);

  • How do I script SWF files instead of JPG files in XML loader?

    I have a SWF loader (greensock.com platform) and a thumbnail image scroll underneath it made of small image buttons. Each image button has a link which loads a new SWF file into the SWF loader above. Here is the code for each button which loads the bigger SWF file into the loader above:
    Button3.addEventListener(MouseEvent.CLICK, Button3_PlayPopUp);
    function Button3_PlayPopUp(event:MouseEvent): void {
        //setting the sourceVar
        sourceVar="3.swf";
        //making the SWFLoader load
        //as setting the soureVar after the SWFLoader is created won't do anything unlesss
        //I also re-create the SWFLoader with the new sourceVar when the button is clicked
        loader_howToLoader2.url = sourceVar;
        loader_howToLoader2.load(true);
    Then I decided to load all button via XML loader. I followed the tutorial on XML loaders which deals with loading jpg images and assigning URL links to them in the following manner first in XML file:
    <image src="appThmb_imgs/appThmb_imgs117x175/A-illuminatorUpLit_117x175.jpg" title="UpDownGlowingVase" url="http://www.888acolyte.com"/>
    and then in AS3 like this:
    var xmlLoader:URLLoader = new URLLoader();
    thisOne.link = imageList[item].attribute("url");
    function clickScrollerItem(e:MouseEvent):void {
    //trace("clicked item " + e.currentTarget.itemNum + " - visit url: " + e.currentTarget.link);
    var urlRequest:URLRequest = new URLRequest(e.currentTarget.link);
    try {
    navigateToURL(urlRequest);
    catch (e:Error) {
    // handle error here
    trace(e);
    My question is: How do I apply the code to each individual small thumbnail button to load a bigger image into the SWF loader above? Do I have to add something to XML file or this way it will never work with jpg images? Can url in XML file set the source var (//setting the sourceVar), since they are all individual and then somehow apply the making SWL loader to load part (//making the SWFLoader load) as a standard somewhere in the AS3 code?

    O.K. Here is my COMPLETE function.
    xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
    function LoadXML(e:Event):void {
        trace("xml load complete");
        xmlData = new XML(e.target.data);
        //trace(xmlData.image); //we'll see each image xml element listed in the output panel with this xmlList
        buildScroller(xmlData.image); //rather than trace the xmlList, we send it to our buildScroller function
    //build scroller from xml
    function buildScroller(imageList:XMLList):void{
        trace("build Scroller");
        //var scroller_x:int=0;
        for (var item:uint = 0; item<imageList.length();item++) {
            var thisOne:MovieClip = new MovieClip();
            //thisOne.img_width=imageList[item].attribute("width");
            //outline
            var blackBox:Sprite = new Sprite();
            blackBox.graphics.beginFill(0xFFFFFF);
            blackBox.graphics.drawRect(-1, -1, 86, 128);//-1,-1 places rectangle 1px left and up.86, 128 draws rectangle 1px wider on all sides of placed image dimenstions of 84x126
            thisOne.addChild(blackBox);
            //scroller_x += thisOne.img_width + 20;
            //var currentX = currentImageWidth+spaceBetween;//modified line to adjust variable thumb widths
            thisOne.x = (84 + padding) *item;//84 is the width of the loaded images and 15 (which was before paddign var) is the padding
            //thisOne.x = scroller_x;//modified line to adjust variable thumb widths
            thisOne.itemNum = item;
            thisOne.title = imageList[item].attribute("title");
            thisOne.link = imageList[item].attribute("url");
            thisOne.src = imageList[item].attribute("src");
            thisOne.alpha = 0;//makes all thumb images at alpha=0 before they are fully loaded
            //trace(thisOne.itemNum, thisOne.title, thisOne.link, thisOne.src);
            //Loading and Adding the Images
            //image container
            var thisThumb:MovieClip = new MovieClip();
            //add image
            var ldr:Loader = new Loader();
            //var url:String = imageList[item].attribute("src");
            var urlReq:URLRequest = new URLRequest(thisOne.src);
            trace("loading thumbnail "+item+" into Scroller: " + thisOne.src);//url
            ldr.load(urlReq);
            //assign event listeners for Loader
            ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,completeHandler);//tells us when the loading is complete
            ldr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);//tells us if there are any typo errors when the loading is complete
            thisThumb.addChild(ldr);
            thisOne.addChild(thisThumb);
            //create listeners for this thumb
            thisOne.buttonMode = true;//makes boxes act as buttons
            thisOne.addEventListener(MouseEvent.CLICK, clickScrollerItem);//makes boxes act as buttons
            thisOne.addEventListener(MouseEvent.MOUSE_OVER, overScrollerItem);//traces the title when the mouse is over the bounding box in the Output Panel
            thisOne.addEventListener(MouseEvent.MOUSE_OUT, outScrollerItem);//traces the title when the mouse is out the bounding box in the Output Panel
            //add item
            scroller.addChild(thisOne);
    But I am not sure if I expressed myself clearly. All what you have indicated happens. Images are being loaded and url strings are working. I can not figure out how to tweek the code so instead of url specified in xml file I can load swf image into the SWF loader on the same screen?

  • Publishing swf file with xml feed

    I am working in actionscript 3 trying to create a flash banner ad that will be put on multiple sites.  The ad will grab a rss feed and display a number from that feed insie the banner ad.  The Flash file works fine on my local computer when I test it.  The feed is showing up just fine in the ad.  When I publish the ad for the web and test it out on my server, the feed does not display in the ad.  I have checked to make sure network access is selected in the publish settings.  I also have a crossdomain.xml policy file on the server with the feed.  My server is listed in the policy to allow access.  I keep thinking I am overlooking something, but can't figure it out.  Any help would be greatly appreciated.
    Here is the code for the action script:
    var rssLoader:URLLoader = new URLLoader();
    var rssURL:URLRequest =
             new URLRequest("http://www.rssfeed.com/rssfeed");
    rssLoader.addEventListener(Event.COMPLETE, rssLoaded);
    rssLoader.load(rssURL);
    var rssXML:XML = new XML();
    rssXML.ignoreWhitespace = true;
    function rssLoaded(e:Event):void{
        var rssXML:XML=new XML(e.target.data);
    trace (rssXML);
        if (rssXML.channel.item[0].description >= 61)
            {rssXML.channel.item[0].description="60+"}
            testXML.text=rssXML.channel.item[0].description;
    Here is the crossdomain.xml policy file:
    <?xml version="1.0"?>
            <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
            <cross-domain-policy>
            <allow-access-from domain="domain.net"/>
            <allow-access-from domain="www.domain.net"/>
            <allow-access-from domain="anotherdomain.com"/>
            <allow-access-from domain="www.anotherdomain.com"/>
            <allow-access-from domain="yetanotherdomain.com>"/>
            <allow-access-from domain="www.yetanotherdomain.com>"/>
            </cross-domain-policy>
    Message was edited by: WRGrun262

    try:
    Security.loadPolicyFile("http://www.rssfeed.com/crossdomain.xml");
    var rssLoader:URLLoader = new URLLoader();
    var rssURL:URLRequest =
             new URLRequest(http://www.rssfeed.com/rssfeed);
    rssLoader.addEventListener(Event.COMPLETE, rssLoaded);
    rssLoader.load(rssURL);
    var rssXML:XML = new XML();
    rssXML.ignoreWhitespace = true;
    function rssLoaded(e:Event):void{
        var rssXML:XML=new XML(e.target.data);
    trace (rssXML);
        if (rssXML.channel.item[0].description >= 61)
            {rssXML.channel.item[0].description=60+}
            testXML.text=rssXML.channel.item[0].description;
    this should be crossdomain.xml in the rssfeed.com root directory
    <?xml version="1.0"?>
            <!DOCTYPE cross-domain-policy SYSTEM http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd>
            <cross-domain-policy>
    <site-control permitted-cross-domain-policies="master-only"/>   
    <allow-access-from domain="domain.net"/>
            <allow-access-from domain="www.domain.net"/>
            <allow-access-from domain="anotherdomain.com"/>
            <allow-access-from domain="www.anotherdomain.com"/>
            <allow-access-from domain="yetanotherdomain.com>/>
            <allow-access-from domain="www.yetanotherdomain.com>/>
            </cross-domain-policy>
    Message was edited by: WRGrun262

  • Importing text from XML file, "\n" not working

    Hi I'm currently trying to set up my game so it pulls in all text from an external XML file (to make switching between different languages easier). The problem is that on several occasions I need to use the special code "\n" to start a new line (for formatting purposes) but when I'm pulling the text in from the XML file this is not starting a new line any more - it is just appearing as normal in the text. (e.g "Here is some \n example game text") How do I get around this?
    Any help here appreciated, I'm supposed to be finished everything by tomorrow so I need suggestions asap haha Thanks.

    I don't see how I can be setting it wrongly, I have the exact line:
    XML.ignoreWhitespace = false;
    Before this I tried myXMLDocName.ignoreWhitespace = false; (before I realised it was a static function)
    This line is placed immediately after I have loaded my XML document and assigned it to a variable. e.g.
    private function XMLLoaded(e:Event):void
                trace("XML Loaded");
                MyGameGlobalVars.xmlDoc = new XML(e.target.data);
                XML.ignoreWhitespace = false;       //previously: MyGameGlobalVars.xmlDoc.ignoreWhitespace = false;
                xmlLoaded = true;

  • Please help. Trying to create external xml vidoe playlist. Desperate!

    I was given an assignment to  create and external video playlist using an xml file.  I have never used  flash before, know nothing about encoding and all that was given to the  class in terms of instuctions was a short tutorial that has no  resources for troubleshooting.  We were given everything; the external  playlist file equipped with the video skin, the video list, actionscript  that loads the xml and the xml file.  We were told that all we need to  do is change the names of the videos in the xml file to match the names  of our videos.  I did that.  We were also told we needed to "name  target", but we were not informed on how to do this.  I have tried  everything, visited every tutorial and I cannot figure out how to get  this damn thing to work.  I cannot even get flash to load the xml file.  PLEASE HELP.
    Here is the xml file:
    <?xml version = "1.0" encoding = "i-8859-1"?>
    <playlist>
    <ADogWithoutABone
    flvurl="ADogWithoutABone.flv"
    desc="Hyper Wall First Video" />
    <Highway
    flvurl="Highway.flv"
    desc="Hyper Wall Second Video" />
    <PsychoBabble
    flvurl="PsychoBabble.flv"
    desc="Hyper Wall Third Video" />
    <SomethingElse
    flvurl="SomethingElse.flv"
    desc="Hyper Wall Fourth Video" />
    </playlist>
    I tried putting in the entire address of the file location, but it did nothing.
    Here is the actionscript in the flash file:
    var xmlLoader:URLLoader = new URLLoader();
    xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
    xmlLoader.load(new URLRequest("playlistXML.xml"));
    function xmlLoaded(event:Event):void {
    var playlistXML:XML = new XML(event.target.data);
    var item:XML;
    for each(item in playlistXML.videoname) {
    trace("item: "+item.attribute("flvurl").toXMLString());
    myPlayList.addItem({label:item.attribute("desc").toXMLString(), data:item.attribute("flvurl").toXMLString()});
    //Select the first video
    myPlayList.selectedIndex = 0;
    //And automatically play it
    myPlayScreen.play(myPlayList.selectedItem.data);
    //Add a listener to detect when new video is selected and play it
    function listListener(event:Event) {
    myPlayScreen.play(event.target.selectedItem.data);
    myPlayList.addEventListener(Event.CHANGE, listListener);
    I  tried placing the full address of the xml file in, along with the file  address of the videos, but again it did nothing.  Everything is located  in the same file, and the videos in a sub file in that file. I tried  taking out the sub file and putting all the videos in the same file, but  it did nothing.  I am sure it's something very simple, but like I said I  have NO experience with this whatsoever. I am SO lost and DESPERATELY  need help. PLEASE someone SAVE MEEEE!
    Thanks

    to parse your xml correctly use:
    function xmlLoaded(event:Event):void {
        var playlistXML:XML=new XML(event.target.data);
        var item:XML;
        for each (item in playlistXML.children()) {
            trace("node: "+item.attribute("flvurl").toXMLString());
            myPlayList.addItem({label:item.attribute("desc").toXMLString(), data:item.attribute("flvurl").toXMLString()});
        //Select the first video
        myPlayList.selectedIndex=0;
        //And automatically play it
        myPlayScreen.play(myPlayList.selectedItem.data);
    you more problems after that, though.  is myPlayList a list component?

  • Creating a function and return something from an XML file

    Hi!
    I'm working with timeline actionscript. I want to create a function that loads my xmlfile and returns an xmlobject with the file's content.
    This is what I got so far:
    my_btn.addEventListener(MouseEvent.CLICK, getXML("myxml.xml")); //1067: Implicit coercion of a value of type void to an unrelated type Function.
    function getXML(fn:String):void{
         var infoLoader:URLLoader = new URLLoader();
         infoLoader.addEventListener(Event.COMPLETE, xmlLoaded);
         infoLoader.load(new URLRequest(fn));
         var myXML:XML = xmlLoaded(); //1136: Incorrect number of arguments.  Expected 1.
         trace(myXML);
    function xmlLoaded(e:Event):XML{
         return e.target.data;
         //trace(e.target.data);
    Can anyone take a look and perhaps point me in the right direction?
    Thanks

    I have never used a listcomponent, so I can only help with the steps before filling it with data.
    I think you should at start of your application load the XML with filenames and just after it's completed, e.g. in Event.COMPLETE handler, load all other XMLs looping through filenamesXML, like this
    var filenamesXML:XML;
    var XMLsToLoad:uint = 0;
    function filenamesXMLLoaded(e:Event):void
         filenamesXML = XML(e.target.data);
         XMLsToLoad =  filenamesXML.filenames.children().length();
         for (var i:uint =1; i < filenamesXML.filenames.children().length(); i++)
                  getXML( filenamesXML.filenames.children()[i] ); // the function from my previous post, don't forget to implement it
    //modify the minor xml load handler from the previous post
    function xmlLoaded(e:Event):void
         var loadedXML:XML = XML(e.target.data);   
         xmlArray.push(loadedXML);
         XMLsToLoad--;
    //assign the one click handler to all buttons, a loop here would be quite handy
    function clickHandler(e:MouseEvent):void
         if (XMLsToLoad == 0) //check if all xmls have been completely loaded
              switch (e.target.name) // swith by clicked button's instance name
                   case "button_1":
                        // here you have to implement supplying listcomponent with data, I think a loop again will be a good idea
                        break;
                   case "button_2":
                        // ibid.
                        break;
    Regards,
    gc

  • Reading an xml file in actionscript using flex3

    plzz tell me how to read an xml file in actionscript using flex3.......

    One possible option to parse an xml-file to a flex XML object:
    public function parseConXML(source:String):void
                    xmlLoader = new URLLoader();
                    xmlLoader.load(new URLRequest(source));
                      // Eventlistener: if URL loaded --> onLoadComplete function
                      xmlLoader.addEventListener(Event.COMPLETE, xmlLoadComplete);
                public function xmlLoadComplete(evt:Event):void{               
                    var xml:XML = new XML();
                     // ignore comments in XML-File
                    XML.ignoreComments = true;  
                       //ignore whitespaces in XML-File
                     XML.ignoreWhitespace = true;
                    // XML-Objekt erstellen
                    xml = new XML(evt.target.data);
                   //AFTERWARDS use your xml as your wish

  • XML..: Problem getting the data in the XML-file..

    I'm developing a flash-file for my customer to use when
    displaying list of products he's selling.
    His list of products is inside a XML-file and he want me to
    display an overview of the products inside a datagrid, so when you
    click on the product you're interested in the productinfo will be
    displayed.
    But.. I'm having problems grabbing the data I want as it
    seems to me that I have to use the unik ID's for each products to
    get the data I want. I've tried adding the unik ID-code to my
    action script but it still won't work.
    Here's a part of the XML-code:
    <Tooldata>
    <Store name="N/A" zipcode="0033450" city="N/A" url="N/A"
    phone="N/A" fax="N/A" email="N/A">
    <Tool unikID="5_0022" control="14" cmnd="update">
    <Toolgroupe>Hammer</Toolgroupe>
    <Brand>Knipps</Brand>
    <Model>K55_Knipps</Model>
    <Price>35€</Price>
    <Weight>N/A</Weight>
    <Soldout>0</Soldout>
    <Color>Red/Black</Color>
    <Images>
    <Images image="5_0022.jpg" prioritet="1" gen_id="16"
    desc="MainImage"/>
    <Images image="5_0022_1.jpg" prioritet="2" gen_id="16"
    desc="Image 1"/>
    <Images image="5_0022_2.jpg" prioritet="3" gen_id="16"
    desc="Image 2"/>
    <Images image="5_0022_3.jpg" prioritet="4" gen_id="16"
    desc="Image 3"/>
    </Images>
    Now, the code above is only one item/product. But there are
    several proucts listed in the XML-file and I find it hard to get
    the product and the product info that I want to be displayed.
    Here's my action script:
    var xmlLoader:URLLoader = new URLLoader();
    var xmlData:XML = new XML();
    xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
    xmlLoader.load(new URLRequest("ToolData.xml"));
    function LoadXML(e:Event):void {
    xmlData = new XML(e.target.data);
    ParseBildata(xmlData);
    function ParseTooldata(TooldataInput:XML):void {
    trace("XML Output");
    trace("------------------------");
    trace(TooldataInput.Store);
    If I want to trace the images I just write
    "trace(TooldataInput.Store.Images);
    But if I want to trace one unik tool it's impossible. Well,
    maybe not impossible.. I just don't know how to do just that.
    When you trace (TooldataInput.Store); you get all the tools
    at that store. But how do I trace only one tool using the unikID??
    Thanks a lot in advance!

    Ace,
    When using E4X if you have multiple nodes at the same level
    you should be able to access them as an XMLList. Looking at your
    XML you should be able to access each <Tool> node as:
    TooldataInput.Store.Tool[0];
    TooldataInput.Store.Tool[1];
    or as an entire list
    TooldataInput.Store.children()
    WL

Maybe you are looking for

  • HT1351 I have a 30GB iPOD which has musin that I want xferred to my new win8 machine

    How do I synch the iPOD with the PC without having all songs on the iPOD erased?

  • Photoshop Cs4 fails to install

    When I go to install CS4 ,I get a message that Bridge is open. It is not open. I try to uninstall CS4 extended trial an the same thing happens. I tried to load CS3 and bridge won't open. CS4 bridge will load even though I have run out of daYS USING T

  • I have to refresh every single website in order to see it

    Hello, i have a problem with my safari, everytime i try to go to a website i have to refresh the website in order to see it. If i dont refresh, it takes long to load the website. Does anyone know why this is happening?, i thought i was only safari bu

  • Oracle configurator

    Hi all, Can anyone of you guys can tell me what configurator is. Is it a module or a tool? Any documentation regarding this will help me a lot. I have to find out what all oracle seeded objects or any other objects that have been modified or customiz

  • Kde 4.6 hibernation/suspend when battery critical level not working

    Hello everyone... I'm using arch (wonderful, perfect, unique, blablabla) for a while now, on my two laptops: dell xps m1530, and asus 1001px. No problem at all with both...exept for suspend and hibernation (WHICH WORK!!)... yes suspend and hibernatio