Hiding XML content in Flash

Ok so I have created this button that expands within a movie clip called "movie1_mc". At frame 12 the button stops expanding and an external XML file loads in 7 subnavigation buttons within a single mc called "button". After the user rolls Off the subnavigation btns the "movie1_mc" button collapses but the laoded xml content is still there. I need to get rid of the XMl content after frame 13 how can I accomplish this?
Below is my coe that loads the XML content:
stop();
function loadXML(loadedX) {
    if (loadedX) {
        xmlNode = this.firstChild;
        image = [];
        total = xmlNode.childNodes.length;
    for (i=0; i<total; i++) {
        image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
        load_pic();
    } else {
        content = "file not loaded!";
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
function load_pic(){
    k = Math.floor(Math.random()*total);
    picture_1.holder.loadMovie(image[k], 1);
//Store Button Position
var yPosition:Number = 210;
var xPosition:Number = 110;
//Declare New XML Object
var myXML:XML = new XML();
//Set Flash to ignore the XML file's white space
myXML.ignoreWhite = true;
//Declare new Array to store the links from the XML file
var links:Array = new Array();
//Declare new Array to store the names from the XML file
var names:Array = new Array();
//Set XML onLoad function
myXML.onLoad = function(){
    //Set varible to store the XML childNodes
    //This allows you to get the number of buttons in the XML file.
    //You'll use this tell flash how many times to loop the for loop.
    var linkname:Array = this.firstChild.childNodes;
    //Set a for loop
    for(i=0;i<linkname.length;i++){
        //Push the button name into the names Array
        names.push(linkname[i].attributes.NAME);
        //Push the button link into the links Array
        links.push(linkname[i].attributes.LINK);
        //Attach the button Movie Clip from the libray give it an instance name and place it on the next highest level
        _root.attachMovie("button","btn"+i,_root.getNextHighestDepth());
        //Set the y position of the buttons
        _root["btn"+i]._x = xPosition;
        //Increace the varible yPosition 15 pixel each time the loop runs to place each button under each other
        xPosition = xPosition+0
        _root["btn"+i]._y = yPosition;
        //Increace the varible yPosition 15 pixel each time the loop runs to place each button under each other
        yPosition = yPosition+30;
        //Place the button name from names Array into the blackTxt text box
        _root["btn"+(i)].blackTxt.Txt.text = (names[i]);
        //Place the button name from names Array into the whiteTxt text box
        _root["btn"+(i)].whiteTxt.Txt.text = (names[i]);
        //Assign the btnOver function to the button onRollOver state.
        _root["btn"+(i)].onRollOver = btnOver;
        //Assign the btnOut function to the button onRollOut state.
        _root["btn"+(i)].onRollOut = btnOut;
        //Assign the btnRelease function to the button onRelease state.
        _root["btn"+(i)].onRelease = btnRelease;
//Load the XML file
myXML.load("links.xml");
//Button Over function
function btnOver(){
    //This referse to the current button the mouse is over
    //Go To And Stop frame 2 of the current button the mouse is over
    this.gotoAndStop(2);
//Button Out function
function btnOut(){
    //Go To And Stop frame 3 of the current button the mouse rolls out from
    this.gotoAndStop(3);
//Button Release function
function btnRelease(){
    //Set a varible named currentBtn equal to the instance name of the current button the mouse clicked on
    var currentBtn:String = this._name;
    //Set a varible named currentIndex equal to the varible currentBtn and the characters between 3rd letter and 5th of that string.
    //This will return a number between 0 and the total number of buttons
    var currentIndex:String = currentBtn.substring(3,5);
    //Get the URL from the links Array
    //Use the currentIndex varible as the index number
    getURL(links[currentIndex]);
Any help with this is greatly appreciated
Cheers-
Graphic Graeme

Hi
Thanks al for ur replies.
Actually my requirement is to send email with some xml data in the body (like failed records to show dat dese are all the records without necessary information).
@Eric,
Using ora:getContentAsString(XMLElement) i only received a blank email without any content. I even tried to write the xml content in a file and used ora:doc() . Even then the body of the email is blank. Dunno wat i am missing here.
@pavan4s
I am literally new to bpel. Can u please elaborate or send some links to use xsl in email body?
Edited by: friendsforever on Oct 11, 2010 2:35 AM
Edited by: friendsforever on Oct 11, 2010 2:36 AM

Similar Messages

  • How to remove white spaces from XML content using Coldfusion?

    Hi,
    Can anybody help me in removing white spaces in between the tags from the below XML content using coldfusion?
    XML content:
    <?xml version="1.0" encoding="UTF-8"?> <chart showdates="true" today="08/12/2009"> <phases> <phase color="CCFFCC" name="Funded"/> <phase color="CDCD67" name="Concept"/> <phase color="99CCFF" name="Feasibility"/> <phase color="0099FF" name="Development"/> <phase color="0099FF" name="Development"/> <phase color="CC99FF" name="Close-out"/> <phase color="909090" name="Sustaining"/> </phases><program name=""> <project enddate=" 30/03/2007 " id="43250" startdate=" 28/02/2006 "> <version enddate=" 30/03/2007 " number=" 1" startdate=" 28/02/2006 "> <phase color="CCFFCC" currentdate="23/03/2006" name="Project Start" plandate="28/02/2006" type="phase"/> <phase color="99CCFF" currentdate="04/04/2006" name="Feasibility Closure" plandate="31/05/2006" type="phase"/> <phase color="0099FF" currentdate="29/03/2007" name="Commercialization" plandate="30/12/2006" type="phase"/> <phase color="CC99FF" currentdate="30/03/2007" name="Project Closed" plandate="30/03/2007" type="phase"/> <phase color="909090" currentdate="" name="Obsolescence" plandate="" type="phase"/> </version> </project> </program> </chart>
    Output I am expecting is like below,
    <?xml version="1.0" encoding="UTF-8"?><chart showdates="true" today="08/12/2009"><phases><phase color="CCFFCC" name="Funded"/><phase color="CDCD67" name="Concept"/><phase color="99CCFF" name="Feasibility"/><phase color="0099FF" name="Development"/><phase color="0099FF" name="Development"/><phase color="CC99FF" name="Close-out"/><phase color="909090" name="Sustaining"/></phases><program name=""><project enddate=" 30/03/2007 " id="43250" startdate=" 28/02/2006 "><version enddate=" 30/03/2007 " number=" 1" startdate=" 28/02/2006 "><phase color="CCFFCC" currentdate="23/03/2006" name="Project Start" plandate="28/02/2006" type="phase"/><phase color="99CCFF" currentdate="04/04/2006" name="Feasibility Closure" plandate="31/05/2006" type="phase"/><phase color="0099FF" currentdate="29/03/2007" name="Commercialization" plandate="30/12/2006" type="phase"/><phase color="CC99FF" currentdate="30/03/2007" name="Project Closed" plandate="30/03/2007" type="phase"/><phase color="909090" currentdate="" name="Obsolescence" plandate="" type="phase"/></version> </project></program></chart>
    Thanks in advance,
    Regards,
    Manoz.

    Daverms,
    Thanks for the quick turn around..
    I have applied the solution what you suggested above (<cfprocessingdrirective suppresswhitespaces="yes"), still whitespaces are existing in my output.
    The output what I am getting is,
    (blue color part is my output & red color indicates whitespaces)
    <?xml version="1.0" encoding="UTF-8"?>
    <chart showdates="true" today="09/12/2009">
    <phases>
    <phase color="CCFFCC" name="Funded"/>
    <phase color="CDCD67" name="Concept"/>
    <phase color="99CCFF" name="Feasibility"/>
    <phase color="0099FF" name="Development"/>
    <phase color="0099FF" name="Development"/>
    <phase color="CC99FF" name="Close-out"/>
    <phase color="909090" name="Sustaining"/>
    </phases>
    <program name="">
    <project enddate=" 01/01/2010 " id="12059" startdate=" 20/06/2003 ">
    <version enddate=" 01/01/2010 " number=" 1" startdate=" 20/06/2003 ">
            <phase color="CCFFCC" currentdate="20/06/2003" name="Project Start" plandate="20/06/2003" type="phase"/>
            <phase color="CDCD67" currentdate="" name="Concept Closure" plandate="" type="phase"/>
            <phase color="99CCFF" currentdate="20/06/2003" name="Feasibility Closure" plandate="20/06/2003" type="phase"/>
            <phase color="F0FF00" currentdate="" name="Alpha Test" plandate="" type="milestone"/>
            <phase color="F0FF00" currentdate="26/07/2004" name="Beta Test" plandate="31/05/2004" type="milestone"/>
            <phase color="0099FF" currentdate="29/06/2005" name="Commercialization" plandate="08/12/2004" type="phase"/>
            <phase color="CC99FF" currentdate="24/02/2006" name="Project Closed" plandate="01/01/2010" type="phase"/>
            </version>
    <subproject enddate=" 16/10/2008 " id="11809" name="espWatcher Pricing Toolkit" startdate=" 01/08/2003 ">
    <version enddate=" 16/10/2008 " number=" 1" startdate=" 01/08/2003 ">
            <phase color="CCFFCC" currentdate="01/08/2003" name="Project Start" plandate="01/08/2003" type="phase"/>
            <phase color="99CCFF" currentdate="" name="Feasibility Closure" plandate="" type="phase"/>
            <phase color="0099FF" currentdate="15/06/2005" name="Commercialization" plandate="08/12/2004" type="phase"/>
            <phase color="CC99FF" currentdate="16/10/2008" name="Project Closed" plandate="16/10/2008" type="phase"/>
            </version>
    </subproject>
    <subproject enddate=" 31/12/2070 " id="35704" name="espWatcher version 2 (2005)" startdate=" 01/01/2005 ">
    <version enddate=" 31/12/2070 " number=" 1" startdate=" 01/01/2005 ">
            <phase color="CCFFCC" currentdate="01/01/2005" name="Project Start" plandate="01/01/2005" type="phase"/>
            <phase color="99CCFF" currentdate="01/07/2005" name="Feasibility Closure" plandate="01/07/2005" type="phase"/>
            <phase color="0099FF" currentdate="31/03/2006" name="Commercialization" plandate="31/03/2006" type="phase"/>
            <phase color="CC99FF" currentdate="31/12/2070" name="Project Closed" plandate="31/12/2070" type="phase"/>
            </version>
    </subproject>
    </project>
    </program>
    </chart>
    However this solution removes most of the whitespaces, I want exact output as flash file is expecting so..
    Where ever I am calling the CF functions, there I am getting the whitespaces. like below cases.
    startdate="#getProjectStartDate(sProjectIdList)#" -> output I am getting for this statement is -> " 12/09/2009 "
    Please assist me...
    Regards,
    Manoz.

  • Print Specific Frames and Dynamic XML content

    Hello, I am trying to print specific frames of my Flash movie
    with the dynamic text loaded from an XML file. The code below only
    prints the current frame I am on and does not print the XML text.
    The dataOK that is commented out is a function I have before that
    loads the XML content. The XML content is loaded to dynamic text
    boxes. Any help on this would be greatly appreciated.

    I am still having difficulty loading the XML data and the
    frameNum parameter does not seem to work. Argghhhh....
    function printTut(myevent:MouseEvent):void{
    var myPrintJob:PrintJob = new PrintJob();
    var mySprite:Sprite = new Sprite();
    var printArea:Rectangle = null;
    var options:PrintJobOptions = null;
    var frameNum:int = 2;
    mySprite.addChild(stage);
    mySprite.rotation=90;
    mySprite.scaleY=.80;
    mySprite.scaleX=.80;
    myPrintJob.start();
    myPrintJob.addPage(mySprite,printArea,options,frameNum);
    myPrintJob.send();
    print_btn.addEventListener(MouseEvent.CLICK,printTut);

  • XML editing from flash, any idea, suggestion

    Hello,
    I have created for a client a website dynamically loaded with
    XML formatted content (XML Files), now the client wants to be able
    to edit the contents of its site (CMS), the site displays several
    things but more specifically a list of products, which you can see
    by browsing the "PRODUCT RANGE" section of
    http://www.cellap.com/.
    I planned to use a php to rewrite the XML with the edited
    data sent from the flash (oldData, newData), it works fine, except
    that there are several problems:
    -I use the "ereg_replace" command of PHP, which seems not to
    handle correctly special charachters such as "*"...
    -If the php is told to replace i.e. "FACE" with "FIGURE", it
    will replace it everywhere on the XML, which is not what I want; so
    maybe I'm not using the right technique; I know it'd be more easy
    to do if the content was on a MySQL database, but the client wanted
    XML, to be able to browse the site offline...
    Any help or suggestions would be greatly appreciated!
    Tks

    loading yes. editing no.
    you need some sort of server script to do the editing(php,
    asp, cmf)
    Dan Mode
    *THE online Radio*
    http://www.tornadostream.com
    *Must Read*
    http://www.smithmediafusion.com/blog
    *Flash Helps*
    http://www.smithmediafusion.com/blog/?cat=11
    "ELTIGRE" <[email protected]> wrote in
    message
    news:e94vsk$fjb$[email protected]..
    > is it posible Loading and Editing xml data from flash
    without any
    > programing language using actionscript only?

  • Catch all error information while validating xml content with xsd schema

    Hi experts,
    I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below is a part of my java mapping.
    XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
    parser.setFeature( "http://xml.org/sax/features/validation" ,  true);
    parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
    parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");          parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); // schema is my schema name
    parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends DefaultHandler
    parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
    // In error handler, I comment all code so as not to throw any exception
    public class ParseErrorHandler extends DefaultHandler
         public void error(SAXParseException e) throws SAXException
              // sSystem.out.println("Error" + e.getMessage());
              // throw e;
         public void fatalError(SAXParseException e)
              // throw e;
              // System.out.println("SAP Fatal Error" + e.getMessage());
    Unfortunately the program always stopped while catching the first error. Check the below log.
    com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
    ERRORS :
    cvc-simple-type : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
    cvc-data : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is is not valid with respoct to the corresponding simple type definition.
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is associated with invalid data.
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]' is not valid with respect to it's complex type definition..
    -> com.sap.engine.lib.xml.parser.ParserException:
    I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error handler logic? Is there any body can make me get out of this?
    Thanks.

    <h6>Hi experts,
    <h6>
    <h6>I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all <h6>error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below <h6>is a part of my java mapping.
    <h6>XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
    <h6>parser.setFeature( "http://xml.org/sax/features/validation" ,  true);
    <h6>parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
    <h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");          <h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); <h6>// schema is my schema name
    <h6>parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends Default Handler
    <h6>parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
    <h6>
    <h6>// In error handler, I comment all code so as not to throw any exception
    <h6>public class ParseErrorHandler extends DefaultHandler
    <h6>{
    <h6>     public void error(SAXParseException e) throws SAXException
    <h6>     {
    <h6>          // sSystem.out.println("Error" + e.getMessage());
    <h6>          // throw e;
    <h6>     }
    <h6>
    <h6>     public void fatalError(SAXParseException e)
    <h6>     {
    <h6>          // throw e;
    <h6>          // System.out.println("SAP Fatal Error" + e.getMessage());
    <h6>
    <h6>     }
    <h6>
    <h6>}
    <h6>
    <h6>Unfortunately the program always stopped while catching the first error. Check the below log.
    <h6>
    <h6>com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
    <h6>ERRORS :
    <h6>cvc-simple-type : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
    <h6>cvc-data : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is is not valid with respoct to the corresponding simple type definition.
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is associated with invalid data.
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item '/:ShipNotice[1]' is not valid with <h6>respect to it's complex type definition..
    <h6> -> com.sap.engine.lib.xml.parser.ParserException:
    <h6>
    <h6>
    <h6>I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error <h6>handler logic? Is there any body can make me get out of this?
    <h6>Thanks.

  • Performance question on small XML content but with large volume

    Hi all,
    I am new to Berkeley XML DB.
    I have the following simple XML content:
    <s:scxml xmlns:s="http://www.w3.org/2005/07/scxml">
    <s:state id="a"/>
    <s:state id="b"/>
    <s:state id="c"/>
    </s:scxml>
    about 1.5K bytes each but the total number of such content is large (5 million+ records).
    This is a typical query:
    query 'count(collection("test.dbxml")/s:scxml/s:state[@id="a"]/following-sibling::s:state[@id="e"])'
    where the id attribute is used heavily.
    I've tested with about 10000 records with the following indexes:
    Index: edge-attribute-equality-string for node {}:id
    Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2002/dbxml}:name
    Index: edge-element-presence-none for node {}:scxml
    Index: edge-element-presence-none for node {}:state
    but the query took just under one minute to complete. Is this the expected performance? It seems slow. Is there anyway to speed it up?
    In addition, the total size of the XML content is about 12M but ~100M of data is generated with the log.xxxxxxxxxx files. Is this expected?
    Thanks.

    Hi Ron,
    Yes, I've noticed the URI issue after sending the post and changed them to:
    dbxml> listindex
    Default Index: none
    Index: edge-attribute-equality-string for node {http://www.w3.org/2005/07/scxml}
    :id
    Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2
    002/dbxml}:name
    Index: edge-element-presence-none for node {http://www.w3.org/2005/07/scxml}:scx
    ml
    Index: edge-element-presence-none for node {http://www.w3.org/2005/07/scxml}:sta
    te
    5 indexes found.
    I added more records (total ~30000) but the query still took ~1 minute and 20 seconds to run. Here is the query plan:
    dbxml> queryplan 'count(collection("test.dbxml")/s:scxml/s:state[@id="start"]/fo
    llowing-sibling::s:state[@id="TryToTransfer"])'
    <XQuery>
    <Function name="{http://www.w3.org/2005/xpath-functions}:count">
    <DocumentOrder>
    <DbXmlNav>
    <QueryPlanFunction result="collection" container="test.dbxml">
    <OQPlan>n(P(edge-element-presence-none,=,root:http://www.sleepycat.com
    /2002/dbxml.scxml:http://www.w3.org/2005/07/scxml),P(edge-element-presence-none,
    =,scxml:http://www.w3.org/2005/07/scxml.state:http://www.w3.org/2005/07/scxml))<
    /OQPlan>
    </QueryPlanFunction>
    <DbXmlStep axis="child" prefix="s" uri="http://www.w3.org/2005/07/scxml"
    name="scxml" nodeType="element"/>
    <DbXmlStep axis="child" prefix="s" uri="http://www.w3.org/2005/07/scxml"
    name="state" nodeType="element"/>
    <DbXmlFilter>
    <DbXmlCompare name="equal" join="attribute" name="id" nodeType="attrib
    ute">
    <Sequence>
    <AnyAtomicTypeConstructor value="start" typeuri="http://www.w3.org
    /2001/XMLSchema" typename="string"/>
    </Sequence>
    </DbXmlCompare>
    </DbXmlFilter>
    <DbXmlStep axis="following-sibling" prefix="s" uri="http://www.w3.org/20
    05/07/scxml" name="state" nodeType="element"/>
    <DbXmlFilter>
    <DbXmlCompare name="equal" join="attribute" name="id" nodeType="attrib
    ute">
    <Sequence>
    <AnyAtomicTypeConstructor value="TryToTransfer" typeuri="http://ww
    w.w3.org/2001/XMLSchema" typename="string"/>
    </Sequence>
    </DbXmlCompare>
    </DbXmlFilter>
    </DbXmlNav>
    </DocumentOrder>
    </Function>
    </XQuery>
    I've noticed the indexes with URI were not used so I added back the indexes without URI:
    dbxml> listindex
    Default Index: none
    Index: edge-attribute-equality-string for node {}:id
    Index: edge-attribute-equality-string for node {http://www.w3.org/2005/07/scxml}
    :id
    Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2
    002/dbxml}:name
    Index: edge-element-presence-none for node {}:scxml
    Index: edge-element-presence-none for node {http://www.w3.org/2005/07/scxml}:scx
    ml
    Index: edge-element-presence-none for node {}:state
    Index: edge-element-presence-none for node {http://www.w3.org/2005/07/scxml}:sta
    te
    8 indexes found.
    Here is the query plan with the above indexes:
    dbxml> queryplan 'count(collection("test.dbxml")/s:scxml/s:state[@id="start"]/fo
    llowing-sibling::s:state[@id="TryToTransfer"])'
    <XQuery>
    <Function name="{http://www.w3.org/2005/xpath-functions}:count">
    <DocumentOrder>
    <DbXmlNav>
    <QueryPlanFunction result="collection" container="test.dbxml">
    <OQPlan>n(P(edge-element-presence-none,=,root:http://www.sleepycat.com
    /2002/dbxml.scxml:http://www.w3.org/2005/07/scxml),P(edge-element-presence-none,
    =,scxml:http://www.w3.org/2005/07/scxml.state:http://www.w3.org/2005/07/scxml),V
    (edge-attribute-equality-string,state:http://www.w3.org/2005/07/scxml.@id,=,'sta
    rt'),V(edge-attribute-equality-string,state:http://www.w3.org/2005/07/scxml.@id,
    =,'TryToTransfer'))</OQPlan>
    </QueryPlanFunction>
    <DbXmlStep axis="child" prefix="s" uri="http://www.w3.org/2005/07/scxml"
    name="scxml" nodeType="element"/>
    <DbXmlStep axis="child" prefix="s" uri="http://www.w3.org/2005/07/scxml"
    name="state" nodeType="element"/>
    <DbXmlFilter>
    <DbXmlCompare name="equal" join="attribute" name="id" nodeType="attrib
    ute">
    <Sequence>
    <AnyAtomicTypeConstructor value="start" typeuri="http://www.w3.org
    /2001/XMLSchema" typename="string"/>
    </Sequence>
    </DbXmlCompare>
    </DbXmlFilter>
    <DbXmlStep axis="following-sibling" prefix="s" uri="http://www.w3.org/20
    05/07/scxml" name="state" nodeType="element"/>
    <DbXmlFilter>
    <DbXmlCompare name="equal" join="attribute" name="id" nodeType="attrib
    ute">
    <Sequence>
    <AnyAtomicTypeConstructor value="TryToTransfer" typeuri="http://ww
    w.w3.org/2001/XMLSchema" typename="string"/>
    </Sequence>
    </DbXmlCompare>
    </DbXmlFilter>
    </DbXmlNav>
    </DocumentOrder>
    </Function>
    </XQuery>
    The indexes are used in this case and the execution time was reduced to about 40 seconds. I set the namespace with setNamespace when the session is created. Is this the reason why the indexes without URI are used?
    Any other performance improvement hints?
    Thanks,
    Ken

  • Efficient way for Continous Creation of XML Content?

    Hi
    I have a requirement of creating xml content from the data extraced from a udp packet.
    As the packet arrives, i have to generate appropriate xml content from them and keep in the same single xml file.
    Problem:
    Since the xml file is not a flat file, i can't just append the new contents at the end. So if i have to write into xml file, Each and Every time i have to parse the content as a packet arrives and insert the new content under appropriate parent. I think this is not the most efficient way.
    Every time parsing the file may affect cpu time and as the file grows in size, the memory will also be a constraint.
    Other options i could think of
    * Hold the XML Document Object in memory until a certain event like timeout for receiving packet and write into the xml file at oneshot.
    * Serialize the objects containing the extracted packet content to a temp file and after some event, parse and create the xml file at oneshot
    Which is the efficient way or is there any design pattern to handle this situation? I am worried about the memory footprint and performance on peak loads
    I am planning to use JDOM / SAX Builder for xml creation.
    Thank you...

    Lot's of "maybe" and "I think" and "I'm worried about" in that question, and no "I have found" or "it is the case that". In short, you're worrying too much about problems you don't even know you have. XML is a verbose format anyway, efficiency isn't paramount when dealing with it. Even modestly powered machines can deal with quite a lot of disk I/O these days without noticeable impact. The most efficient thing you can do here is write something that works, and see if you can live with the performance

  • Import of XML file failed in portal using XML Content and Action

    Hi Friends,
    I am trying to import the simple XML file which is just creating the folder in the PORTAL_CONTENT using XML CONTENT AND ACTIONS  which is one way of creating the portal content. GO TO SYSTEM ADMINISTRATION > TRANSPORT > XML CONTENT AND ACTIONS > IMPORT.
    The reason for using this import tool is to upload the backend Business roles, which is not not working on our corporate portal. To test the import functionality I used the following xml file (I got this XML file by exporting the test folder in the portal using the same tool)
    <GenericCreator author="XML Creator" version="XML Automatic Creation" mode="clean,execute" report.level="success" createMode="1" default.locale="en" ignore="false">
    <Context name="portal_content" objectClass="com.sap.portal.pcd.gl.GlContext"></Context>     <Property name="parent1" value="pcd:portal_content"/>
         <Context name="com.dri.fldr.im" objectClass="com.sap.portal.pcd.gl.GlContext" create_as="0" parent="$">
              <Attributes>
                   <Attribute name="com.sap.portal.pcm.Description" type="text">
                        <AttributeValue value="" locale=""/>
                        <Attribute name="administration" type="string">
                             <AttributeValue value=""/>
                        </Attribute>
                        <Attribute name="Inheritance" type="string">
                             <AttributeValue value="NONFINAL"/>
                        </Attribute>
                   </Attribute>
                   <Attribute name="com.sap.portal.pcm.Title" type="text">
                        <AttributeValue value="test" locale=""/>
                        <AttributeValue value="test" locale="en"/>
                        <Attribute name="administration" type="string">
                             <AttributeValue value=""/>
                        </Attribute>
                        <Attribute name="mandatory" type="string">
                             <AttributeValue value="true"/>
                        </Attribute>
                        <Attribute name="Inheritance" type="string">
                             <AttributeValue value="NONFINAL"/>
                        </Attribute>
                   </Attribute>
              </Attributes>
         </Context>
    </GenericCreator>
    SDN BLOCKED THE XML The above XML file works fine in other portal in the landscape but not in corporate portal ( which is freshly build recently).Following error message is display when i am trying to upload the file
    Status Name Action Type Comment
    General Extracting root node E:\usr\sap\EPD\JC00\j2ee\cluster\server0\%USERPROFILE%\AppData\Local\Temp\tmp_masscontent4135391959047431276.xml Failed to extract root node
    General Extracting root node E:\usr\sap\EPD\JC00\j2ee\cluster\server0\%USERPROFILE%\AppData\Local\Temp\tmp_masscontent4135391959047431276.xml Parsing failed .
    Dont know is there a service/ configurations needs to be done to enable this feature?.
    Thanks
    Edited by: hammad on Sep 4, 2009 5:48 PM
    Edited by: hammad on Sep 4, 2009 5:49 PM

    The problem statement is not very clear.
    Try following this how to guide [https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/207a2141-c870-2910-e080-90c920b24f47&overridelayout=true|How-To]
    Best Regards,
    Prasanna K

  • How to create new XML file using retreived XML content by using SAX API?

    hi all,
    * How to create new XML file using retreived XML content by using SAX ?
    * I have tried my level best, but output is coming invalid format, my code is follows,
    XMLFileParser.java class :-
    import java.io.StringReader;
    import java.io.StringWriter;
    import javax.xml.transform.OutputKeys;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMResult;
    import javax.xml.transform.sax.SAXSource;
    import javax.xml.transform.sax.SAXTransformerFactory;
    import javax.xml.transform.sax.TransformerHandler;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.xml.sax.Attributes;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.xml.sax.helpers.XMLFilterImpl;
    public class PdfParser extends XMLFilterImpl {
        private TransformerHandler handler;
        Document meta_data;
        private StringWriter meta_data_text = new StringWriter();
        public void startDocument() throws SAXException {
        void startValidation() throws SAXException {
            StreamResult streamResult = new StreamResult(meta_data_text);
            SAXTransformerFactory factory = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
            try
                handler = factory.newTransformerHandler();
                Transformer transformer = handler.getTransformer();
                transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
                transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                handler.setResult(streamResult);
                handler.startDocument();
            catch (TransformerConfigurationException tce)
                System.out.println("Error during the parse :"+ tce.getMessageAndLocation());
            super.startDocument();
        public void startElement(String namespaceURI, String localName,
                String qualifiedName, Attributes atts) throws SAXException {
            handler.startElement(namespaceURI, localName, qualifiedName, atts);
            super.startElement(namespaceURI, localName, qualifiedName, atts);
        public void characters(char[] text, int start, int length)
                throws SAXException {
            handler.characters(text, start, length);
            super.characters(text, start, length);
        public void endElement(String namespaceURI, String localName,
                String qualifiedName) throws SAXException {
            super.endElement("", localName, qualifiedName);
            handler.endElement("", localName, qualifiedName);
        public void endDocument() throws SAXException {
        void endValidation() throws SAXException {
            handler.endDocument();
            try {
                TransformerFactory transfactory = TransformerFactory.newInstance();
                Transformer trans = transfactory.newTransformer();
                SAXSource sax_source = new SAXSource(new InputSource(new StringReader(meta_data_text.toString())));
                DOMResult dom_result = new DOMResult();
                trans.transform(sax_source, dom_result);
                meta_data = (Document) dom_result.getNode();
                System.out.println(meta_data_text);
            catch (TransformerConfigurationException tce) {
                System.out.println("Error occurs during the parse :"+ tce.getMessageAndLocation());
            catch (TransformerException te) {
                System.out.println("Error in result transformation :"+ te.getMessageAndLocation());
    } CreateXMLFile.java class :-
    Sax.startDocument();
    Sax.startValidation();
    Sax.startElement("", "pdf", "pdf", new AttributesImpl());
    Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());          
    String xmp_str = new String(meta_data.getByteArray(),"UTF8");
    char[] xmp_arr = xmp_str.toCharArray();
    Sax.characters(xmp_arr, 0, xmp_arr.length);
    Sax.endElement("", "pdf", "pdf");
    Sax.endValidation();
    Sax.endDocument();
    Sax.endElement("", "basic-metadata", "basic-metadata");* In CreateXMLFile.java
    class, I have retreived the xml content in the meta_data object, after that i have converted into character array and this will be sends to SAX
    * In this case , the XML file created successfully but the retreived XML content added as an text in between basic-metadata Element, that is, retreived XML content
    is not an XML type text, it just an Normal text Why that ?
    * Please help me what is the problem in my code?
    Cheers,
    JavaImran

    Sax.startDocument();
    Sax.startValidation();
    Sax.startElement("", "pdf", "pdf", new AttributesImpl());
    Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());          
    String xmp_str = new String(meta_data.getByteArray(),"UTF8");
    char[] xmp_arr = xmp_str.toCharArray();
    Sax.characters(xmp_arr, 0, xmp_arr.length);
    </code><code>Sax.endElement("", "basic-metadata", "basic-metadata");</code>
    <code class="jive-code jive-java">Sax.endElement("", "pdf", "pdf");
    Sax.endValidation();
    Sax.endDocument();     
    * I HAVE CHANGED MY AS PER YOUR SUGGESTION, NOW SAME RESULT HAS COMING.
    * I AM NOT ABLE TO GET THE EXACT OUTPUT.,WHY THAT ?
    Thanks,
    JavaImran{code}

  • Pass parameter through standard page "import xml content and actions"

    Dear Portal experts,
    As you know, a standard portal page is configured to allow the import of XML file. It is located in the portal in the path system admin -> transport -> xml content and actions -> import
    I configured a quick link u201Cimportu201D to the page so now the link http://myserver:port/irj/portal/import allows me to access directly to this screen.
    What I would like to do now is to pass the parameter related to u201Cfile nameu201D through this screen meaning that I would like that http://myserver:port/irj/portal/ import/filename=C:\test.xml  fills automatically the fields u201CXML fileu201D with  C:\test.xml 
    Please do you know how to achieve this ?
    Thank you very much and regards

    hi,
    @Maksim :
    When user launch an URL like http://myserver:port/irj/portal/ import/*filename=C:\test.xml, he is requested to provide username and password; as this link is a shortcut for the upload xml page, there is a check of authorization and only portal admin that have authorization and permission on this page/iview will be able to upload xml file through the URL. Hope this clarify.
    @Kumar :
    thank you for your answer. What a pity to not be able to pass parameter through standard portal page/iview particularly knowing that we can pass paramater through many kinds of iviews (transactional iview, url iview, VC iview...). I explored some option on file com.sap.portal.ivs.init.par but this was unsuccessful. However, thanks to this [link bellow|http://wiki.sdn.sap.com/wiki/display/Snippets/ComponenttouploadXMLfilewithPCD+objects], I was able to upload through URL the XML file.
    The problem is that I can upload only XML file that are stored in the server not in the local user computer. My requirement is to be able to upload local XML file stored on user's computer.
    If someone could provide and idea/solution, I would be very grateful.
    Cheers

  • Urgent Please - How avoid namespace tag in XML Content

    Hi XI Experts,
    <?xml version="1.0" encoding="UTF-8"?>
    <b><ns0:AAA xmlns:ns0="http://Abc.com"></b>
    <DocHeader><ClientID>ABC</ClientID><ClientDocID>null</ClientDocID><UserID>PurchaseOrder</UserID></DocHeader><Request Type="PO" action="insert"><ClientReference>PO-0099000099</ClientReference><DeliveryDate>20071025</DeliveryDate><Vendor>5104</Vendor><OrderLine><ExpectQTY>1.000</ExpectQTY></OrderLine></Request>
    <b></ns0:AAA></b>
    Please tell me how to avoid the xml content which is in <b>Bold</b>?
    Thank X in Advance......

    Hi,
    for removing namespace from ur XML content,remove the namespace from field XML namespace while defining message type.
    Refer:
    /people/sameer.shadab/blog/2005/12/05/how-to-remove-namespaces-in-mapping--xi
    and for removing </ns0:AAA> u can use XMLAnonymizerBean in modules.
    refer:
    /people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean
    Regards,
    Anoop

  • How to remove actual XML content from Weather Web Service Client's standard output?

    Hi,
    I tried web service example examples.webservices.rpc.weatherEJB.Weather with WLS6.1,
    it works fine, but on client side, ( either Client or DClient ), I always see
    the actual XML content being sent and received from standard output, like
    "------------- RECEIVING XML -------------", and I can't find any related System.out.println
    statement in client source code, Please explain how to remove it, may there is
    a configurable parameter for this? any help will be highly appreciated.
    Thanks
    Naichen

    Hi Naichen,
    To suppress showing the actual SOAP request and response going to standard out,
    change the following line in the Client.java:
    h.put("weblogic.soap.verbose", "true" );
    to read:
    h.put("weblogic.soap.verbose", "false" );
    Regards,
    Mike Wooten
    "Naichen Liu" <[email protected]> wrote:
    >
    Hi,
    I tried web service example examples.webservices.rpc.weatherEJB.Weather
    with WLS6.1,
    it works fine, but on client side, ( either Client or DClient ), I always
    see
    the actual XML content being sent and received from standard output,
    like
    "------------- RECEIVING XML -------------", and I can't find any related
    System.out.println
    statement in client source code, Please explain how to remove it, may
    there is
    a configurable parameter for this? any help will be highly appreciated.
    Thanks
    Naichen

  • Access XML Content from Alert Category (ALRTCATDEF) ?

    Hi PI Expert,
    is that possible to access xml content from Alert Category (ALRTCATDEF) if the error occurs from Adapter engine.
    For example IDOC number / PO Number, so i can put in into Subject email notification.
    At the moment i am only know how to send dynamic data from ccBPM.
    Please advise.
    Thank You and Best Regards
    Fernand.

    Hai,
    Yes the user existed in QA before I transported the category. (Since users are not transported, I simply created a user with the same name.) Also, I used the role SAP_XI_ADMINISTRATOR for the receivers via subscription and roles.
    Thanks,
    Filipe

  • How to overwrite  the xml file by  flash using Php

    Hi
    i am creating getting data from the xml file ... and i am
    doing some Alteration in the xml file by flash after that flash
    producing the xml file i finished upto this process...
    nw i neeed to overwrite the xml file.... using Php.....
    can any one give me some idea ... to solve this issue
    ~~SK

    Flash Player cannot write XML files at all. but using
    php+flash we could do it .

  • Same XML content on more than one page?

    (Indesign CC on OSX)
    I have a  12-page indesign document in which each page contains a resized version of the same ad. (for placment in a variety of publications)
    I have an external xml file that contains master copy. When I link to this file, the copy on the first page functions/updates properly, but when I try to place the xml content into the container frames on any of the other pages, it swaps the content into that new location instead of just placing a duplicate instance of the external data.
    I'd like a way to be able to edit master copy externally in an xml file, then have all of my resized ad pages in Indesign update with one press of the 'update all links' button.
    Is this possible?

    I decided to put in a new ID following the first advice, and also as I am making videochat calls between the two playbooks whilst a family member is on vacation borrowing my other one, so they need different IDs.
    I would like to mark one answer as a solution but I have two diametrically opposed answers!
    so I'll just have to wipe then try and set up my new one with the existing ID when the old one is returned to me and come back.  It would be nice to have access to my purchases on both, as per Apple's practice.
    Thanks all.

Maybe you are looking for

  • Select All in Mailboxes in iOS

    I am looking to find out if there's some shortcut, trick, or hint as to how to do a select all in one of the mailboxes in Mail for iOS.  I realize you can Delete All in the trash, which is helpful, but I'm looking for a way to, for example, not have

  • Cant Charge/connect ipod touch. Get an error saying "One of the USB devices attached to your computer has malfunctioned, and Windows does not recognize it" . HELP.

    Ok . so my ipod touch 2G , used to be all ok . its just yesterday i went to charge my ipod it wouldnt do anything . Then after being plugged in for a bit , i got  pop up saying "  "One of the USB devices attached to your computer has malfunctioned, a

  • Passing dynamic internal table into ALV

    I have made one ALV report where i had created one button 'GENERATE'.  ON CLICKING THIS BUTTON the data in the ALV report is downloaded to excel file. i have used this:- CALL METHOD cl_gui_frontend_services=>file_save_dialog     EXPORTING       windo

  • Less than Useless

    So for this newsgroup has been less than useless. Lots of questions, no answers at all. Has ANYONE gotten 6.0 to install under RH 7.1? Why do you end up with /tmp/install.dir.xxx/Solaris/resource/jre.tar.Z?

  • Generics bug with multiple interface inheritance?

    Hi, I've noticed what I believe to be a compiler bug (I am getting an error where I believe none should exist). Can someone please comment on the following use-case? interface Interface1<SelfType extends Interface1<SelfType>> interface Interface2 cla