Parsing XML Array problem

my previous issue became somewhat a different problem;
basically now when I trace the variables I'm getting undefined. Any help is very appreciated. Thank you!


> = award.secondChild.nodeValue description

There is no such thing as secondChild.

> image = new Array (images.length);

Where image is defined at the outset? You can't just use an index like this if
image is not already an array.

I suggest you change the design a bit. An array of objects of price
could work well.

var allAwards = new Array();

var price = new Object();
Award.Caption = "my caption";
Award.images = new Array();

allAwards.push (award);

Then you can do like:

trace(allAwards[0].) Caption);

--
Dave-
www.offroadfire.com
Developer leader
http://www.blurredistinction.com
Adobe Community Expert
http://www.Adobe.com/communities/experts/

Tags: Adobe Animate

Similar Questions

  • Problem in parsing XML

    Hello

    Any1 can you please tell me how to do Xml parsing in Blackberry. I'm a bit confused by it.

    Assume that it is my link:

    {keyword: "keword", url: "videoUrl"}

    While parsing xml:

    String keyword1 ="";

    element.getName.equalsIgnoreCase ("keyword");

    keyword1 = Element.GetText ();

    is she writing?

    Hey its done.

  • Best way to Parse XML using Dreamweaver CC 2015.3

    I was on a wild goose chase - trying to figure out how to parse XML using DW CC

    every article I read, says something about XML & XSLT, but it is no longer available in the new CC - I read about using jQuery or php, but have not yet find a resource to learn specifically "using DW CC.

    I'm willing to learn how to parse XML with DW CC but I would get a definitive direction to go before I'm trying to learn something that adobe will put in 'end of life '.

    advice or links to resources that can parse XML DW CC 2015 would be LARGELY APPRECIATED, thank you

    x 126 has written:

    What I'm asking is...

    1. What is the best procedure to insert XML into a page using DW CC 2015 as my editor?
    a. what happened to spry? b. what happened to XSLT?

    As Nancy explained, Spry has been abandoned by Adobe, a few years ago.

    XSLT server behavior has been removed at the same time as other server behaviors Dreamweaver CC. The problem with most of the PHP server behaviors was that they were based on code that has been removed from PHP 7. The XSLT server behavior didn't rely on these features, but it was not the most friendly of server behaviors. XSLT is a complex language that is to be avoided when parsing XML unless you really know what you're doing.

    The easiest way to manipulate XML in Dreamweaver should use PHP SimpleXML. I've linked to the samples page in the PHP online documentation. Believe me, it's much easier than trying to do battle with XSLT. If you have a subscription to lynda.com, you can learn more about SimpleXML to my operational with SimpleXMLclass.

  • Err: ORA-31011: failed to parse XML

    Hello

    While inserting the XML code in the table, I faced slot problem, Pls suggest a way out of the code.
    Your help is appreciate.
    I'm using the version of Oracle - 10.2.0.2.0

    Err: ORA-31011: failed to parse XML
    ORA-19202: an error has occurred in the processing of XML
    LPX-00234: the 'xsi' namespace prefix is not declared
    Error on line 1
    ORA-06512: at "SYS." XMLTYPE", line 254
    ORA-06512: at line 1

    -Step 1
    CREATE TABLE EMP (EMPCODE NUMBER (8), EMPNAME VARCHAR2 (100), THE NUMBER OF EMPDEPTNO (8), NUMBER EMPSAL (34.2));
    /
    -Step 2
    BEGIN
    FOR X IN (SELECT * FROM USER_OBJECTS S WHERE ROWNUM < = 50)
    LOOP
    INSERT INTO VALUES EMP (X.OBJECT_ID, X.OBJECT_NAME, 20, X.OBJECT_ID + 10);
    END LOOP;
    COMMIT;
    END;
    /
    -Step 3
    create the table EMPXML (XMLCLOB XMLTYPE);
    /
    -Step 4
    DECLARE
    v_xmldata CLOB.
    v_tmpdata CLOB.
    v_xmltype XMLTYPE.
    BEGIN
    DBMS_LOB.CREATETEMPORARY (v_tmpdata, false);
    v_xmldata: = ' <? XML version = "1.0" encoding = "UTF-8"? > ';

    SELECT Xmlelement ("employee",

    XmlAttributes ("http://ns.oracle.com.tw/XSD/ORACLE/ESB/Message/EMF/ServiceEnvelope" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" AS ")
    "xmlns:ns0,"
    ' http://ns.oracle.com.tw/XSD/ORACLE/ESB/Message/EMF/ServiceEnvelope ServiceEnvelope.xsd > ' AS
    ("xsi: schemaLocation").
    XMLAGG (Xmlforest (AS Empcode "EmpID",
    EmpName AS "EmpName",.
    Empsal AS 'EmpSal'))) BY v_xmltype
    FROM Emp
    WHERE Empdeptno = 20;

    SELECT v_xmltype.getCLOBVal () IN the v_tmpdata FROM dual;

    DBMS_LOB. Append (v_xmldata, v_tmpdata);

    BEGIN
    INSERT IN EMPXML VALUES (xmltype (v_xmldata));
    EXCEPTION WHEN OTHERS THEN
    dbms_output.put_line ('Err: ' |) SQLERRM);
    END;
    END;
    /
    -Step 5
    SELECT * from empxml;
    /
    -Step 6
    DROP TABLE EMP PURGE;
    /
    -Step 7
    DROP TABLE EMPXML PURGE;
    /
    Thank you and best regards,
    Yogesh Nagle
    India

    What? Pepijn you provided the correct use of Xmlattributes and showed that your script would go without errors. What is the problem with his answer or it does not that you need it?

  • Parsing XML and get the attributes of a tag

    Hello

    When parsing XML for application of Cascades in C++, I am able to get the value of a tag as follows:

    00000

    But I also want to get the attributes of a tag:

    But I don't know how to get the 'CA' and 'California' attributes with my current code.  Can anyone help?  Here is the code I use to parse the XML code:

    void CMController::requestFinished(QNetworkReply* reply) {
    
        if (reply->error() == QNetworkReply::NoError) {
    
            QXmlStreamReader xml;
    
            QByteArray data = reply->readAll();
            xml.addData(data);
    
            QString zip;
            QString id;
            QString location;
    
            while (!xml.atEnd() && !xml.hasError()) {
    
                /* Read next element.*/
                QXmlStreamReader::TokenType token = xml.readNext();
    
                /* If token is just StartDocument, we'll go to next.*/
                if (token == QXmlStreamReader::StartDocument) {
                    continue;
                }
    
                /* If token is StartElement, we'll see if we can read it.*/
                if (token == QXmlStreamReader::StartElement) {
    
                    if (xml.name() == "zip") {
                        zip = xml.readElementText();
                    }
    
                    if (xml.name() == "id") {
                        ???
                    }
    
                    if (xml.name() == "location") {
                        ???
                    }
    
                }
    
            }
    
            emit succeeded(result);
    
        } else {
            emit failed();
        }
    
        reply->deleteLater();
    
    }
    

    Thank you!

    I found a working example:

    if(xml.name() == "state"){
        QXmlStreamAttributes attrib = xml.attributes();
        QStringRef ref = attrib.value("location");
        qDebug() << "location: " << ref;
    }
    
  • Widget to the Web service, parsing XML

    I worked on the communication with my web services and back to my widget.

    By using the code below, I was able to perform a GET and repay the XML, but I can't find data where I expect it to be node-wise when parsing XML. I return an object with 3 variables attached to it. I expect to be child nodes 1, 2, and 3. They proved to be 1, 3 and 5 nodes.

    Any ideas on why or how? I feel I'm missing just a simple thing in all of this.

    XML response

    
    - http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
      1000
      Test Station
      105.285
      
    

    The widget code

    //****************** Ajax Logic ******************
    var xmlHttp;
    function getStationUpdate() {
    
        alert("in station update");
        xmlHttp = new XMLHttpRequest();
    
        var Posturl = "http://MachineIPGoesHERE:51107/Service1.asmx/HelloWorld2?";
        alert("after post url");
        xmlHttp.onreadystatechange = updateData;
        alert("after onReadyStateChange");
        xmlHttp.open("GET", Posturl, true);
        alert("after GET");
    
        xmlHttp.send(null);
    }
    
    function updateData() {
        if (xmlHttp.readyState == 4) {
            alert(xmlHttp.responseText);
            parser = new DOMParser();
            var xmlDoc = parser.parseFromString(xmlHttp.responseText, "text/xml");
    
            alert(xmlDoc.documentElement.childNodes[1].tagName + " " + xmlDoc.documentElement.childNodes[1].childNodes[0].nodeValue);
            //alert(xmlDoc.documentElement.childNodes[1].childNodes.length);
            //alert(xmlDoc.documentElement.childNodes[1].hasChildNodes());
            //alert(xmlDoc.documentElement.childNodes[2].hasChildNodes());
            //alert(xmlDoc.documentElement.childNodes[2].tagName + " " + xmlDoc.documentElement.childNodes[2].childNodes[0].nodeValue);
            alert(xmlDoc.documentElement.childNodes[3].tagName + " " + xmlDoc.documentElement.childNodes[3].childNodes[0].nodeValue);
            alert(xmlDoc.documentElement.childNodes[5].tagName + " " + xmlDoc.documentElement.childNodes[5].childNodes[0].nodeValue);
    
            alert(xmlDoc.documentElement.childNodes.length);
        }
    

    Web service

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Services;
    using System.Xml.Serialization;
    
    namespace WebService1
    {
        /// 
        /// Summary description for Service1
        /// 
        [WebService(Namespace = "http://tempuri.org/")]
        [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
        [System.ComponentModel.ToolboxItem(false)]
        // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
         [System.Web.Script.Services.ScriptService]
        public class Service1 : System.Web.Services.WebService
        {
    
            [WebMethod]
            public string HelloWorld()
            {
                return "Hello World";
            }
    
            [WebMethod]
            public myTestObj HelloWorld2()
            {
                myTestObj test = new myTestObj();
                return test;
            }
        }
    
        [Serializable]
        public class myTestObj
        {
            private int _StationID;
            private string _StationName;
            private double _Volume;
    
            [XmlElementAttribute(Order = 0)]
            public int StationID
            {
                get
                {
                    return this._StationID;
                }
                set
                {
                    this._StationID = value;
                }
            }
    
            [XmlElementAttribute(Order = 1)]
            public string StationName
            {
                get
                {
                    return this._StationName;
                }
                set
                {
                    this._StationName = value;
                }
            }
    
            [XmlElementAttribute(Order = 2)]
            public double Volume
            {
                get
                {
                    return this._Volume;
                }
                set
                {
                    this._Volume = value;
                }
            }
    
            public myTestObj()
            {
                StationID = 1000;
                StationName = "Test Station";
                Volume = 105.285;
            }
        }
    }
    

    > Any ideas on why or how? I feel I'm missing just a simple thing in all of this.

    White space nodes?

  • Parsing XML in ColdFusion 5

    Hello there,

    It's not like there is a native way to parse XML in ColdFusion version 5.0. ColdFusion MX makes it easier to work with XML, but unfortunately I am working under Windows with a CF5 server.

    I've gotten to the point of use CFHTTP to retrieve XML content in a variable, but I don't know the best way to decompress the data in a query, or another structure that I can use to feed the rest of the model. I thought to save the content of a file and then a loop top, but something tells me that it is an inefficient way to do the job.

    I would like to avoid having to install any additional software, but if it's the only way to process XML in CF5, then I would be grateful for any recommendations on the best tools to evaluate or buy. Or if there is a way to do it in JavaScript, it would be great, too.

    Thanks for any help!

    try to use SoXML, it is a custom tag, is free and can be downloaded from the Adobe Exchange website

    --> Adobe Exchange link

    M

  • Parsing JSON to ListView array problem

    I need help in parsing JSON to ListView array.

    I have no problem to parse this JSON

    [
        {
            "id": "123",
            "name": "KFC",
            "contact": {
                "phone": "+1175757",
                "twitter": "kfc"
            }
        }
    

    to this qml:

    import bb.cascades 1.0
    import bb.data 1.0
    Page {
        content: ListView {
            id: listView
            dataModel: dataModel
            listItemComponents: [
                ListItemComponent {
                    type: "item"
                    Container {
                        verticalAlignment: VerticalAlignment.Center
                        Container {
                            horizontalAlignment: HorizontalAlignment.Fill
                            verticalAlignment: VerticalAlignment.Center
                            layout: DockLayout {
    
                            }
                            Container {
                                horizontalAlignment: HorizontalAlignment.Fill
                                verticalAlignment: VerticalAlignment.Center
                                topPadding: 20
                                layout: StackLayout {
                                    orientation: LayoutOrientation.LeftToRight
                                }
                                Container {
                                    verticalAlignment: VerticalAlignment.Center
                                    leftMargin: 30
                                    Label {
                                        bottomMargin: 0
                                        bottomPadding: 0
                                        text: ListItemData.name
                                        verticalAlignment: VerticalAlignment.Center
                                        textStyle {
                                            base: SystemDefaults.TextStyles.TitleText
                                            fontWeight: FontWeight.Normal
                                        }
                                    }
                                }
                            }
                        }
                        Divider {
                        }
                    }
                }
            ]
        }
        attachedObjects: [
            GroupDataModel {
                id: dataModel
            },
            DataSource {
                id: dataSource
                source: "myjson.json"
                onDataLoaded: {
                    dataModel.insertList(data)
                }
            }
        ]
        onCreationCompleted: {
            dataSource.load();
        }
    }
    

    but I do not know how to work with this type of JSON:

    {
        "meta": {
            "code": 200
        },
        "response": {
            "myplace": [
                {
                    "id": "123",
                    "name": "KFC",
                    "contact": {
                        "phone": "+1657465",
                        "twitter": "kfc"
                    }
                }
            ]
        }
    }
    

    can someone help please!

    The problem is that DataSource will convert your JSON to a QVariantMap, and not to a QVariantList, as required by the GroupDataModel::insertList ().  Try this:

            DataSource {
                id: dataSource
                source: "myjson.json"
                onDataLoaded: {
                    dataModel.insertList(data.response.myplace)
                }
            }
    
  • Problem with parsing XML with html as part of the node content

    Hi all

    I am facing problem with XML parsin when the node has a HTML content, if the node does not have any html content then it works fine. Similar analysis logic works for Java Standard, but not for the Blackberry API. I have an obligation to remove not HTML content prior to analysis. As that would display in the browser.

                              String xml="" +
                    "<p> Dummy content </p> " +
                    "" +
                    "";
                              DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
                DocumentBuilder dBuilder;
                Document doc;
                bis = new ByteArrayInputStream(xml.getBytes("UTF-8")); 
    
                dBuilder = dbFactory.newDocumentBuilder();
    
                doc = dBuilder.parse(bis);
                doc.getDocumentElement().normalize();
    
                NodeList nList = doc.getElementsByTagName("disclaimer");
    
                Element activeTagElmnt = (Element) nList.item(0);
                NodeList activeTag = activeTagElmnt.getChildNodes(); 
    
                tagValue=((Node) activeTag.item(0)).getNodeValue();
                              System.out.println(tagValue); //This prints "<" with HTML content. If i remove HTML then "Dummy Content" is printed
    

    If I need to remove html content, then I would need to reformat the content according to the HTML as the newline to a linebreak.

    Any suggestions would be helpful.

    Thank you

    Sandeep

    I feel xml parser was mature enough to handle these characters if sills, you get the error explore CDATA. It might help you.

  • Problem of Parsing XML

    Hi all

    I have a XML Data...

    As

    
    
        
        
        
        
        
        
        
        
        
        
    
    
    

    I want to get the name of node and its values...

    But I'm not able to analyze and get access those.

    I tried using DOM parser.

    Everyone please help.

    Thanks and greetings

    Stephenson

    Similar to what manojkbaghela wrote:

    DocumentBuilderFactory docFact = DocumentBuilderFactory.newInstance ();
    DocumentBuilder docBuilder = docFact.newDocumentBuilder ();

    Doc document = docBuilder.parse ({inputSource file});
    doc.getDocumentElement () .normalize ();
    NodeList listOfRecords = doc.getElementsByTagName ("node");
    int totalElements = listOfRecords.getLength ();

    for (int s = 0; s< totalelements;="" s++)="">

    Element myElement = listOfRecords.item (s) (element);

    LinkID = myElement.getAttribute ("LinkID") string;
    String subject = myElement.getAttribute ("Topic");
    Position of the string = myElement.getAttribute ("heading");

    }

  • problem in parsing xml with validation

    Hello

    I use webservice and xml parsing allows to get data from it, he worked successfully when I put data valid that webservice are made up.

    But now, I want that if I put some data not valid in URLs for validation purposes.

    When I put the wrong data, it shows me exception. So, how I can handle it when the user put data not valid.

    Please help me .it's urgent.

    Thanks for the reply,

    I solved it myself.

  • Help parsing XML message using PeopleCode

    Hi all

    I'm new to web services and XML, but was able to consume a WSDL and call the web service successfully.

    I am now trying to parse the XML message that I receive as an answer and to retrieve values that I need and with the response analysis problems. Here's what I did and the my AE Test code. Basically, I'm trying to navigate to the 'Results' element in the response, and then use GetChildNode to get the child nodes, then use FindNode to find items and their values.

    Here's the WSLD I used to create the web service in PS. I only need WSDL operation doSearch_3_15
    [https://www.epls.gov/epls/services/EPLSSearchWebService?wsdl]

    My PC below calls the web service and passes the family name "ZOD" as a search parameter, and this should return 3 results back.

    I'm grabbing the response back and analyse to extract the values I need.

    + & inXMLDoc = CreateXmlDoc(""); +
    + & ret = inXMLDoc.ParseXmlString (& answer. GenXMLString()); +

    The question that I have is to be able to get 'inside' the results node (there are 3 of them) and browse the child nodes and get my values.

    AE Test code:

    Local channel & charge useful, & responseStr, last;
    Local Message msg & response;
    Local XmlDoc xml & inXMLDoc;
    Local of the array of XmlNode GetElements, RecordList, & field1List & aResultsNode;
    Local XmlNode RecordNode & ClassificationNode;
    Local file & MYFILE;

    + & FilePath = ' / psoft/ultimate.9/fpsdv1/prod/ap/files / '; +
    "+ & FileName = uhc_report.xml" +;
    + & MYFILE = GetFile (& FilePath | & FilePath_Absolute of filename, "W", %); +.

    + & payload = "<? XML version = "1.0"? "> < doSearch xmlns ="https://www.epls.gov/epls/services/EPLSSearchWebService">"; +
    + & first = ""; +
    + & last = "ZOD"; +
    + & payload = & load useful | "< query > < first >. and first. "< / first > < last > | & last. "< / last > < / query > < / doSearch > ';" +

    + & xml = CreateXmlDoc (& payload); +
    + & msg = CreateMessage (Operation.DOSEARCH_3_15, IntBroker_Request %) +;
    + & msg. SetXmlDoc(&xml); +

    + & reply = IntBroker.SyncRequest % (& msg); +

    If All(&reply) then

    If & MYFILE. IsOpen then
    + & MYFILE. WriteString (& response. GenXMLString()); +
    On the other
    MessageBox (0, "", 0, 0, "cannot Open File.");
    End - If;

    + & inXMLDoc = CreateXmlDoc(""); +
    + & ret = inXMLDoc.ParseXmlString (& answer. GenXMLString()); +

    If & then ret

    + & field1List = & inXMLDoc.GetElementsByTagName ("results"); +

    If & field1List.Len = 0 Then
    MessageBox (0, "", 0, 0, "GetElementsByTagName node not found");
    Error ("GetElementsByTagName Node not found");
    + / * perform some processing of error * / +.
    On the other
    J = 1 & at & field1List.Len
    If & j > 1 Then
    + MessageBox(0, "", 0, 0, &field1List [&j].) NodeName | " = " | field1List [& j]. NodeValue); +

    + & RecordNode = & inXMLDoc.DocumentElement.GetChildNode (& j); +
    If & RecordNode.IsNull then
    MessageBox (0, "", 0, 0, "GetChildNode not found");
    On the other
    + & ClassificationNode = & RecordNode.FindNode ("classification"); +
    If & ClassificationNode.IsNull then
    MessageBox (0, "", 0, 0, "FindNode not found");
    On the other
    + & SDN_TYPE = Substring (& ClassificationNode.NodeValue, 1, 50); +
    MessageBox (0, "", 0, 0, "& SDN_TYPE =" |) (& SDN_TYPE);
    End - If;
    End - If;

    End - If;
    -End;
    End - If;

    MessageBox (0, "", 0, 0, & inXMLDoc.DocumentElement.NodeName);

    On the other
    + / * perform some processing of error * / +.
    MessageBox (0, "", 0, 0, "error.) ParseXml");
    End - If;

    On the other
    MessageBox (0, "", 0, 0, "error.) No response").
    End - If;


    See the link below for the web service XML response with a few Notes message. As a link between the response as an XML doc (had to add .txt to xml extension to download).  I appreciate your help and comments.
    http://compshack.com/files/XML-message.PNG
    http://compshack.com/files/uhc_report.xml_.txt

    And here is the result of my AE Test. I'm able to find 3 County results, that I expected because I have 3 files returned from the web service, but fails for some reason, GetChildNode.

    results = (0,0)

    GetChildNode not found (0.0)

    results = (0,0)

    GetChildNode not found (0.0)

    results = (0,0)

    GetChildNode not found (0.0)

    Published by: Maher on 12 March 2012 10:21

    Published by: Maher on 12 March 2012 10:41

    Hello

    I made a few adjustments to your code.
    First of all you need not create an XMLDOC object on the IB response, since it is already a XML.
    Instead use something like this:

    / * Send & receive message * /.
    & ResMsg = % IntBroker.SyncRequest (& ReqMsg);
    / * Get XMLDOC of the response message * /.
    & xml = ResMsg.GetXmlDoc ();
    strxml = & xml. GenFormattedXmlString();
    / * read the reply * /.
    & aNodeData = & xml. GetElementsByTagName ("yournodename")

    Now your code fixed

    &inXMLDoc = CreateXmlDoc("");
    &ret = &inXMLDoc.ParseXmlFromURL("c:\temp\test.xml");
    If &ret Then
       &field1List = &inXMLDoc.GetElementsByTagName("results");
       If &field1List.Len = 0 Then
          MessageBox(0, "", 0, 0, "GetElementsByTagName Node not found");
          Error ("GetElementsByTagName Node not found");
          /* do error processing */
       Else
          For &j = 1 To &field1List.Len
             If &j > 1 Then
                MessageBox(0, "", 0, 0, &field1List [&j].NodeName | " = " | &field1List [&j].NodeValue);
                &RecordNode = &field1List [&j];
    
                &RecordChildNode = &RecordNode.GetChildNode(&j);
                If &RecordChildNode.IsNull Then
                   MessageBox(0, "", 0, 0, "GetChildNode not found");
                Else
                   MessageBox(0, "", 0, 0, "&RecordChildNode name:" | &RecordChildNode.NodeName);
    
                   &ClassificationNode = &RecordNode.FindNode("classification");
                   If &ClassificationNode.IsNull Then
                      MessageBox(0, "", 0, 0, "FindNode not found");
                   Else
                      &SDN_TYPE = Substring(&ClassificationNode.NodeValue, 1, 50);
                      MessageBox(0, "", 0, 0, "&SDN_TYPE = " | &SDN_TYPE);
                   End-If;
    
                End-If;
             End-If;
          End-For;
       End-If;
       MessageBox(0, "", 0, 0, &inXMLDoc.DocumentElement.NodeName);
    
    Else
       /* do error processing */
       MessageBox(0, "", 0, 0, "Error. ParseXml");
    End-If;
    

    Result:
    PeopleTools 8.51.12 - Application Engine
    Copyright (c) 1988-2012 Oracle and/or its affiliates.
    All rights reserved

    results = (0,0)
    Game number of messages: 0
    Number of messages: 0
    Reason for the message: results = (0.0) (0.0)

    & RecordChildNode name: address (0,0)
    Game number of messages: 0
    Number of messages: 0
    Reason for the message: & RecordChildNode name: address (0.0) (0.0)

    & SDN_TYPE =
    Individual (0,0)
    Game number of messages: 0
    Number of messages: 0
    Reason for the message: & SDN_TYPE =
    Individual (0.0) (0.0)

    results = (0,0)
    Game number of messages: 0
    Number of messages: 0
    Reason for the message: results = (0.0) (0.0)

    & RecordChildNode name: agencyUID (0,0)
    Game number of messages: 0
    Number of messages: 0
    Reason for the message: & RecordChildNode name: agencyUID (0.0) (0.0)

    & SDN_TYPE =
    Individual (0,0)
    Game number of messages: 0
    Number of messages: 0
    Reason for the message: & SDN_TYPE =
    Individual (0.0) (0.0)

    results = (0,0)
    Game number of messages: 0
    Number of messages: 0
    Reason for the message: results = (0.0) (0.0)

    & RecordChildNode name: classification (0,0)
    Game number of messages: 0
    Number of messages: 0
    Reason for the message: & RecordChildNode name: classification (0.0) (0.0)

    & SDN_TYPE =
    Individual (0,0)
    Game number of messages: 0
    Number of messages: 0
    Reason for the message: & SDN_TYPE =
    Individual (0.0) (0.0)

    soapenv:envelope (0,0)
    Game number of messages: 0
    Number of messages: 0
    Reason for the message: soapenv:Envelope (0.0) (0.0)
    Application Engine TEST_AE program ended normally

    Find the differences :)

    Published by: Hakan Biroglu on March 12, 2012 19:22

  • global variables for the XML plugin problem

    Hello world

    recently I started working on a dialog box SOUTH, where the user can load the *.xml files in DIAdem.So much my code for the button looks like this:

    ....

    Call the FileNameGet ('ALL', 'FileRead","*.xml")
    Call DataFileLoad (FileDlgName, "XML_Plugin", "Load")

    ....

    And I must say that it works very well! I am able to load all listed in the devices file. BUT when I tried a number of loading devices, I used a global variable, that I defined in the vbscript file that I load the SOUTH since, I've noticed that global variables, I've defined with GlobalDim are not defined in the vbs.:mansurprised of XML_Pluging:

    Then I started to experiment and so far without success, no matter where I define global variables, in my plugin *.xml all not defined! The native commands even and DIAdem functrions does not work. If I run the script in tiara, it shows no errors, but when I use the plugin to open a file, then it gives an error. For example, MsgBox is not allowed.

    I used the plugin example for *.xml, which was published on the Web site of NOR, and I made a few changes. But overall I have it has not corrupted and I kept the same structure:

    Void ReadStore (File)

    Dim XmlFile: xmlFile = File.Info.FullPath
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    'open the file '.
    OpenXMLFile xmlFile

    End Sub

    Void OpenXMLFile (xmlFile)
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    ' Open MS - Xml Parser
    'Create the ActiveX object for the Microsoft XML parser.
    Dim XDoc: set xDoc = CreateObject ("MSXML2. DOMDocument.3.0")

    "Try to load the XML document
    If xDoc.Load (xmlFile) = False Then
    "Failed to load the document XML.
    RaiseError ' unable to load XML document!
    End If

    protected originalLocale: originalLocale = Getlocalte
    "SetLocale" en - us ".

    "The XML document loaded successfully!
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    '----------------------------------------------
    "Read the header information.
    '----------------------------------------------

    Here, I have read some values of the header and then I loop on all devices present in the file!

    So basically I have two subroutines and that's all.

    SetLocale originalLocale

    End Sub

    So what I am doing wrong? Why global variables and other functions do not work. Is it because there is xml code in the script this way or it's a version problem?

    I use DIAdem 10.2. If I use global variables in other vbscripts, I use to draw curves for example I have no problem. Now I'm no *.xml code and no subroutines.

    I'd appreciate any solution that will make my *.xml plugin to work.

    Hi fscommand.

    It is expected all behavior.  Use XML, as all VBScript DataPlugins, runs in a separate VBScript host of the DIAdem VBScript host.  DIAdem VBScript host adds all global variables green and Red controls global to host Microsoft VBScript standard.  Use VBScript host has its own special abilities (file object, root object), but there is NO access to Globals green or red blanket orders in the reception of DIAdem VBScript.  Your SUDialog runs in a third host VBScript, which is separated from the other two and the other two are not capabilities (command SUDialog callback functions), but the SUDialog VBScript host and VBScript tiara share all global variables green and Red orders overall.

    Normally all blue VBScript commands are allowed in all 3 VBScripts hosts, but in the case of the DataPlugins MsgBox and InputBox functions were especially restrained because the dialogues could cause a lot of trouble with the DataFinder.  In fact, they have been allowed to 9.1 tiara which was the latest version of tiara for the DataFinder appear.

    So, why do you want to pass information between the XML use and tiara?  If you want to use to share information with DIAdem, then you should just expose every piece of information as a new property in the data portal, which can read and use the code VBScript DIAdem.  The path of the XML file is already available inside the use of XML.  What other information in the call VBScript DIAdem do you need to share with the use?

    Brad Turpin

    Tiara Product Support Engineer
    National Instruments

  • parse xml timestamp labview in javascript

    Hi, im reading XML files created from labview7.1 with javascript and it works fine, the only problem is that I don't know how to parse the timestamp. For DS

    ...


    Date of Eximination


    4


    0



    0



    -916291696



    0


    ...

    should be the date of 2011-01-24 and

    ...


    Date of Eximination


    4


    0



    0



    -916205296



    0


    ...

    2011-01-25 indices?

    It seems to work

    
    
    
    
  • Selection of the menu XML text problem

    Hi all

    I built a video menu xml that displays a simple text of my XML document in a movieclip that is added to a sprite called btnContainer, the btnContainer is then added to the scene. Once these buttons are selected, they load the appropriate video. The problem I have is that I want the selected button to change color. There are three different XML files loaded according to 3 static buttons on the stage, that is to say 2009 / 2008 / 2007. By default the code 2009 XML file is loaded. My code works fine the first time that the script runs - when one of the XML buttons is selected it changes color and returns all other buttons to their default color - but when I click on the button 2008 or 2007 and load their XML files, and the buttons do not change their color. Then when I click on back button 2009 and 2009 XML load button changes color but the rest of the buttons do not change in their default state? My code is below

    Thanks in advance for any help

    Fl.video import. *;

    Import gs.*;

    Gs.easing import. *;

    //----------------------------------VARIABLES--------------------------------

    var vid:FLVPlayback;

    vid = new FLVPlayback();

    VID.source = "video/press_long_beach_2009.flv";

    VID. Width = 480

    VID. Height = 360

    VID. Skin = "SkinUnderPlayStopSeekMuteVol.swf";

    vid.skinBackgroundColor = 0 x 000000;

    vid.skinBackgroundAlpha =.5

    addChild (vid)

    VID.x = 385

    VID.y = 80

    var myLoader:Loader = new Loader();

    var container: MovieClip = new MovieClip;

    var xml = new XML;

    var xmlList:XMLList = new XMLList;

    var xmlLoader:URLLoader = new URLLoader;

    var dateLoader:Loader

    var dateBtn:mcDateBtn

    var items_array:Array = new Array();

    var btnContainer:MovieClip = new MovieClip;

    var boxContainer:Sprite = new Sprite();

    //-------------------------------------------ADD LISTENERS------------------------------

    xmlLoader.load (new URLRequest("data/2009videos.xml"))

    xmlLoader.addEventListener (Event.COMPLETE, xmlComplete)

    yearBtnContainer.btn09.addEventListener (MouseEvent.CLICK, showYearBtns)

    yearBtnContainer.btn08.addEventListener (MouseEvent.CLICK, showYearBtns)

    yearBtnContainer.btn07.addEventListener (MouseEvent.CLICK, showYearBtns)

    //------------------------------------------FUNCTIONS------------------------------------

    function showYearBtns(event:Event):void

    {

    if (this.contains (btnContainer))

    {

    for (var i: int = 0; i < xmlList.length (); i ++)

    {

    btnContainer.removeChildAt (0);

    }

    }

    if(event.target == yearBtnContainer.btn09)

    {

    xmlLoader.load (new URLRequest("data/2009videos.xml"))

    }

    other if (event.target == yearBtnContainer.btn08)

    {

    xmlLoader.load (new URLRequest("data/2008videos.xml"))

    }

    other if (event.target == yearBtnContainer.btn07)

    {

    xmlLoader.load (new URLRequest("data/2007videos.xml"))

    }

    }

    function xmlComplete(event:Event):void

    {

    xml = XML (event.target.data);

    xmlList = xml.children ();

    for (var i: int = 0; i < xmlList.length (); i ++)

    {

    trace ("working")

    dateBtn = new mcDateBtn;

    items_array.push (dateBtn);

    btnContainer.addChild (dateBtn)

    dateBtn.x = 20;

    dateBtn.y = i * 60 + 100;

    dateBtn.name = xmlList [i] .attribute ("videoURL")

    dateBtn.dateTxt.htmlText = xmlList [i];

    dateBtn.dateTxt.wordWrap = true

    dateBtn.dateTxt.width = 270;

    dateBtn.dateTxt.height = 90;

    dateBtn.dateTxt.background = true;

    dateBtn.dateTxt.backgroundColor = 0 x 333333;

    dateBtn.mouseChildren = false;

    dateBtn.buttonMode = true;

    dateBtn.id = i;

    dateBtn.addEventListener (MouseEvent.CLICK, showImage)

    trace ('underneath')

    }

    addChild (btnContainer)

    }

    function showImage(event:MouseEvent):void

    {

    for (var j: int = 0; j < xmlList.length (); j ++)

    {

    //trace(event.target.id)

    if(j==event.currentTarget.id)

    {

    trace ("working color")

    TweenLite.to (event.target,.3, {tint: 0xFFDB00, ease:Strong.easeOut});})

    }

    to another if(!event.currentTarget.select)

    {

    trace ("working without color")

    ([ //trace(items_array[i])

    items_array [j]. Select = false;

    items_array [j] .mouseEnabled = true;

    TweenLite.to (items_array [j],.5, {tint: 0xFFFFFF, ease:Strong.easeOut});})

    }

    }

    vid.source = event.target.name

    }

    It's not like you're clearing items_array()

Maybe you are looking for