Analyze the XML order getElementsByTagName node

Is the order of the elements in a NodeList returned by a rootElement.getElementsByTagName ("item") coherent? I have an XML that returns items in order descending by date (most recent at the top).  Can I count on item (0) is always the most recent and the order preserved?

As long as your XML file shows how you said, the order does not change.

Item (0) should be your most recent.

Tags: BlackBerry Developers

Similar Questions

  • Impossible to analyze the xml.aspx contained in the main.js.Iam get the following error"could not obtain XML document, and the connection has failed: status 500

    Impossible to analyze the xml.aspx contained in the main.js.Iam get the following error"could not obtain XML document, and the connection has failed: status 500

    My main.js resembles

    xmlDataSource var = {}
     
    URL: 'dcds. - symbianxml.aspx", etc. (sample).
     
    init: function() {}
    URL, successful reminder, the reminder of failure
    This.Connect (this.) (URL, this.responseHandler, this.failureHandler);
    },
     
    /**
    * Analyzes the XML document in an array of JS objects
    @param xmlDoc XML Document
    * @returns {table} array of objects of the device
    */
    parseResponse: {function (xmlDoc)}
        
    var chElements = xmlDoc.getElementsByTagName ("channel");
       
    channels of var = [];
      
    Console.log (chElements.Length);
      
    for (var i = 0; i)< chelements.length;="">
        
    var channel = {};
       
    for (var j = 0; j)< chelements[i].childnodes.length;="">
        
    var node = Sublst.ChildNodes(1).ChildNodes(0) chElements [i] [j];
                
    If (node.nodeType! = 1) {//not an element node}
    continue;
    }
           
    Channel [node. TagName] = node.textContent;
    }
       
    Channels.push (Channel);
    }
    Console.log (Channels.Length);
    return the strings;
    },
     
    /**
    Manages the response and displays the data from device web app
    @param xmlDoc
    */
    responseHandler: {function (xmlDoc)}
      
    var channel = this.parseResponse (xmlDoc);
    var markup = "";
       
    for (i = 0; i< channels.length;="">
       
    markup += this.generateHTMLMarkup (i, channels [i]);
    }
    document.getElementById("accordian").innerHTML = mark-up;
    },
     
    /**
    Generates HTML tags to insert in to the DOM Web App.
    * @index i, index of the device
    @param device, device object
    */
    /*
    generateHTMLMarkup: function (i, channel) {}
      
    var str ="";
    "Str += '.


    ' onclick =-"mwl.setGroupTarget ('#accordian ',' #items_" + i + "', 'ui-show ',' ui - hide');" + ".
    "mwl.setGroupTarget ('#accordian ',' item_title_ #" + i + "', 'ui-open', 'ui-farm'); Returns false; \ » > » ;
    "" Str += "" + channel ['name'] + ' ";
    "Str += '.
    ";
    "Str += '.
    ";
    "Str += '.
    "+" id: "+ channel ['id'] +" ' "
    ";
    "Str += '.
    "+" type: "+ channel ['type'] +" ' "
    ";
    "Str += '.
    "+" language: "+ channel ['language'] +" ' "
    ";
    "Str += '.
    «+ "bandwidth:" + "fast" channel + "»»
    ";
    "Str += '.
    "+" cellnapid: "+ channel ["cellnapid"] +". "
    ";
    "Str += '.
    «+ ' link: '+'start the video »»
    ";
    "Str += '.
    ";
    return str;
    },*/
    generateHTMLMarkup: function (i, channel) {}
       
    var str ="";
    "Str += '.
    ";
    str +=  "" +
    "" + channel ['name'] + ""+""
    ";
    "Str += '.
    «+ ' link: '+'start the video »»
    ";
         
    return str;

    },
     
    failureHandler: {function (reason)}
    document.getElementById("accordian").innerHTML = "could not get XML document.
    '+ reason;
    },
     
    /**
    Retrieves a resource XML in the given URL using XMLHttpRequest.
    @param url URL of the XML resource to retrieve
    @param called successCb, in the XML resourece is recovered successfully. Retrieved XML document is passed as an argument.
    @param failCb called, if something goes wrong. Reasons, in text format, is passed as an argument.
    */

    Connect: {function (url, successCb, failCb)
      
    var XMLHTTP = new XMLHttpRequest();
      
    XMLHTTP. Open ("GET", url, true);

    xmlhttp.setRequestHeader("Accept","text/xml,application/xml");
    xmlhttp.setRequestHeader ("Cache-Control", "non-cache");
    xmlhttp.setRequestHeader ("Pragma", "non-cache" "");
      
    var that = this;
    XMLHTTP.onreadystatechange = function() {}
       
    If (xmlhttp.readyState == 4) {}
        
    If (XMLHTTP. Status == 200) {}
         
    {if (!) XMLHTTP.responseXML)}
    try {}
    If server has not responded with good an XML MIME type.
    var domParser = new DOMParser();
    var xmlDoc = domParser.parseFromString(xmlhttp.responseText,"text/xml");
           
    successCb.call (that, xmlDoc);
           
    } catch (e) {}
    failCb.call (, "answer was not in an XML format.");
    }
              
    } else {}
    successCb.call (that, xmlhttp.responseXML);
    }
    } else {}
    failCb.call (this, "connection failed: status"+ xmlhttp.status ");
    }
    }
    };
    XMLHTTP. Send();
    }
    };

    Please see the content in main.js is fully analyzed.

    Forward for the solution to my request all members of the community...

  • Analyze the XML...

    Hi all.

    I have a problem, I use this method to download an xml file which revice since a .net webservice

    oapObject request = new SoapObject("http://tempuri.org/", "METODH");
                Integer i = new Integer(1);
                request.addProperty("Bloque", i);
                request.addProperty("mostrarContenido", "1");
                SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    
                envelope.bodyOut = request;
                envelope.dotNet = true;
                envelope.encodingStyle = SoapSerializationEnvelope.XSD;
                HttpTransport ht = new HttpTransport("xxxxxxx" + ac);
                ht.debug = true;
                ht.call("http://tempuri.org/METHOD", envelope); 
    
                //System.out.println("Request \n" + ht.requestDump);
                //System.out.println("Response \n" + ht.responseDump);
    
                FileConnection fc = null;
                try {
                    fc = (FileConnection) Connector.open(ruta + "myfile.xml", Connector.READ_WRITE);
                       if (fc.exists()){
                            fc.truncate(0L);
                       }else{
                            fc.create();
                        }
                        OutputStream os = fc.openOutputStream();
                        os.write(ht.responseDump.getBytes());
                        os.close();
                        fc.close();
    

    In the code, I create xml file dump Pentecost, after reading the XML and parsing.

    Its possible to read the XML in memory? whitout create the file? for example load the dump memory and read the tags xml directly?

    Thanks in advance

    If the XML data is a byte array, you can create a ByteArrayInputStream and feed to an XML parser (the DOM and SAX parsers are supported on the BB). If the data is in the form of a string or a char array, you can do two things:

    1. Convert the string into a byte array using a suitable encoding (UTF-8, to be sure) and then create as before.
    2. Write a StringReader class that extends the drive runs through the table String or char, then create an InputSource around that and feed the InputSource of an XML parser. It is more effective because you don't have to copy the data before analyzing it, but you must write your own class StringReader.

    For the life of me, I don't know why a StringReader class is not built in the BB.

  • Analyze the XML Image Description

    HI -.

    I modified a flash animation that displays images in a slider control. When the user will fly over the image I show a ToolTip. The problem is that I can not understand how to analyze the Description (desc) out of the image in the XML tag to display the ToolTip text. Here's what I want to look like the image tag:

    < images >

    < path of the image = "images/02.png" desc = "2" link = "http://srv01-dnn/Products/CoreCollection/Detail.aspx" target = "_parent" / >
    < path of the image = "images/03.png" desc = "3" link = "http://srv01-dnn/Products/CoreCollection/Summary.aspx" target = "_parent" / >
    < / images >

    In the code actionScript how could I simply analyze the description in the ToolTip text?

    Thanks for any help on this.

    Larry

    Assuming you have a variable xm referencing this XML can:

    trace (XM.image.length ());

    2

    trace (XM.image.@desc [0]);

    2

    trace (XM.image.@desc [1]);

    3

  • Analyze the XML problem!

    I'm having trouble building a parser for my XML file, I tried to adapt one of the pieces of code in the examples
    comes with Flash, but still can't make it work.
    Can anyone help or point me in the right direction where I'm wrong please.

    Here is my adapted code: -.

    var CP_XML:XML = new XML();
    var masterArray:Array = new Array();
    CP_XML.ignoreWhite = true;
    CP_XML. OnLoad = {function (success)}

    move to the first node
    var curr_node:XMLNode = this.firstChild.firstChild;
    out all the < VW_WEB_Curr_Projs1
    var i: Number = 0;
    for (var childNode = curr_node; childNode! = null; childNode = childNode.nextSibling, i ++) {}

    the index of the strings in each array will be the j
    var j: Number = 0;

    masterArray = new Array();

    masterArray
    [0] = childNode.nodeName; nodeName = < VW_WEB_Curr_Projs1
    j ++ ;

    for (var stringNode:XMLNode = childNode.firstChild; stringNode! = null; stringNode = stringNode.nextSibling, j ++) {}
    masterArray [j] = stringNode.firstChild.nodeValue;
    }
    }

    Feed the ComboBox with CP_ names
    for (var k = 0; k < masterArray.length; k ++) {}
    cp_cb. AddItem (masterArray [k] [0]);
    }

    Fill the initial value of the text on stage fields
    p1_txt. Text = masterArray [0] [1];
    p2_txt. Text = masterArray [0] [2];
    }

    var cpListener:Object = new Object();

    cpListener.change = function (eventObj) {}
    for (var l = 0; l < masterArray.length; l ++) {}

    If (masterArray [l] [0] == eventObj.target.value) {}
    Set the two elements of the array 1 and 2 textfields
    p1_txt. Text = masterArray [l] [1];
    p2_txt. Text = masterArray [l] [2];

    break;
    }
    }
    }

    cp_cb.addEventListener ("change", cpListener);

    load the XML file
    CP_XML. Load ("BC_testshort.xml");
    //--------------------------------------------------------------------------------------- -------------------------------------
    Now with the above code, I can get the names of node ' < VW_Web_Curr_Projs1', but can't get any info from inside them, but that's all I can do!
    Any pointers or help with this please?

    //---------------------------------------------------------------------------------------- --------------------------------------

    Here's the XML file, I'm trying to read called 'BC_testshort.xml '.

    < xmlns:sql ROOT = "urn: schemas-microsoft-com: XML - sql" > < VW_Web_Curr_Projs1 Proj_ID = "1766" Title = "Copy of your GP letter..." "Init ="Ze"name ="Assim"Prog_ID = 'NP' = Main_research_question" the main goal of research is to... ". "" Start_date = "" 2007-02 - 01 T 00: 00:00 ' end_date = "2007-08 - 01 T 00: 00:00 ' Research_Group = 'Medicine' LocalLead = '1' / > < VW_Web_Curr_Projs1 Proj_ID ="1765"Title ="Understanding. "... "Init = name family"A"="Poe"Main_research_question ="goal
    Each... "" Start_date = "" 2005-10 - 01 T 00: 00:00 ' end_date = "2007-10 - 01 T 00: 00:00 ' Research_Group = 'Surgery' LocalLead = '1' / > < VW_Web_Curr_Projs1 Proj_ID ="1764"Title =" origins impact results of... " "Init =" Q"name = 'Pierre' Prog_ID ="the detection and prevention of damage"Main_research_question =" what is the prevalence of... "" "" Start_date = "" 2006-12 - 01 T 00: 00:00 ' end_date = "2008-06 - 01 T 00: 00:00 ' Research_Group = 'Neuroscience' LocalLead = '1' / > < VW_Web_Curr_Projs1 Proj_ID = '1763" Title = "Predicting persistence..." "Init =" R"name = 'Wheel' Prog_ID ="the detection and prevention of damage"Main_research_question ="this study aims to connect the data... " "" Start_date = "" 2006-04 - 01 T 00: 00:00 ' end_date = "2007-10 - 01 T 00: 00:00 ' Research_Group = 'Neuroscience' LocalLead = '1' / > < VW_Web_Curr_Projs1 Proj_ID ="1762"Title ="Closing the skin..." "Init =" Y"name ="HOM"Prog_ID = 'Musculoskeletal disease' Main_research_question ="the first goal... " "" Start_date = "" 2007-02 - 01 T 00: 00:00 ' end_date = "2008-02 - 01 T 00: 00:00" Research_Group = "Musculoskeletal" LocalLead = "1" / > < / ROOT >

    //---------------------------------------------------------------------------------------- -------------------------------------------------

    Hello
    See the code.
    I've traced all the attributes and values.
    You can just push them in a desired table and use them to fill in anything...

  • extraction of xmltype table in the xml output: redundant nodes

    Hi guys - see example below.  (edit: Sorry, did not use these forums for a while and can't seem to understand how to format the code...)

    [code] SQL > select *.

    the v version $2;

    BANNER

    --------------------------------------------------------------------------------

    Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production

    PL/SQL Release 11.2.0.4.0 - Production

    CORE Production 11.2.0.4.0

    AMT for Linux: Version 11.2.0.4.0 - Production

    NLSRTL Version 11.2.0.4.0 - Production

    [/ code]

    [/ code]

    SQL > create table mytesttable (item_id issue, x_data xmltype);

    Table created.

    SQL >

    SQL > insert into mytesttable

    2 with dat (select ' blah' point of double

    3 Union all the

    4 Select "blah" more than double)

    5, t as (select xmlelement ("x_data"

    6, xmlattributes (1 as "dummyattr")

    7, xmlagg (xmlelement ("item"

    8                                                ,item))

    9                              ) x_data

    10 dat

    11              )

    12. Select 1, x_data

    13 t;

    1 line of creation.

    SQL >

    SQL > select *.

    2 of mytesttable;

    ITEM_ID

    ----------

    X_DATA

    ---------------------------------------------------------------------------------------------

    -------

    1

    < x_data dummyattr = "1" >

    < item > blah < / item >

    < element > more blah < / item >

    < / x_data >

    1 selected line.

    SQL >

    SQL > select xmlelement ("outerelement"

    2, xmlelement ("itemID", item_id)

    3, xmlelement ("x_data", x_data)

    4                   )

    5 mytesttable;

    XMLELEMENT ("OUTERELEMENT", XMLELEMENT("ITEMID",ITEM_ID), XMLELEMENT("X_DATA",X_DATA))

    ---------------------------------------------------------------------------------------------

    -------

    < outerelement > < itemID > 1 < / itemID > < x_data > < x_data dummyattr = "1" >

    < item > blah < / item >

    < element > more blah < / item >

    < / x_data >

    < / x_data > < / outerelement >

    1 selected line.

    [/ code]

    Like the above, I have an xmltype in a table that has other non-xmltype columns.   I have a requirement to extract them out in a single xml document in a manner similar to the last SQL it.

    the problem is that if I do it according to the foregoing, I add a redundant node artificially.  the first node < x_data > is not necessary, but how can I go and add the xmltype column to the result without having to qualify it with another element around it?

    know how to do the following:

    < outerelement > < itemID > 1 < / itemID > < x_data dummyattr = "1" >

    < item > blah < / item >

    < element > more blah < / item >

    < / x_data > < / outerelement >

    ?

    Too bad... I had a moment mute:

    Select xmlelement ("outerelement"

    xmlelement ("itemID", item_id)

    x_data

    )

    of mytesttable;

  • How to analyze all the data of the particular tag in the xml file

    Hi all

    I have a xml file, who like tags, code, rev_num, type... volunteers. I want to analyze the XML and save all data (code, rev_num...) the unknown tag in a text file. I tried to use a node matching vi, but I do not get the output I have need.attach is my attempt, can someone suggest me or help out me. (Sorry Cant join the XML so I recorded it in a text file.)

    Thank you

    Ankit G

    You must replace the instance of "resource" with "resource [type = 'unknown']." Did you do it?

  • The XML parsing problems

    I started with the sample of XML parsing and tried to get a simple user interface that loads buttons with the value of a child node (more later to go to a new screen and analyze another XML code).  When I analyze the XML code, I get the knots, but I don't get the values.  My example of XML is generated.

    Example of XML data:

    
    
    
    
             Bugs     BugsXML.action 
    
    
    

    Code:

    import java.io.InputStream;
    
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    
    import mbt.util.DataUtils;
    import net.rim.device.api.system.Application;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.RichTextField;
    import net.rim.device.api.ui.component.SeparatorField;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.xml.parsers.DocumentBuilder;
    import net.rim.device.api.xml.parsers.DocumentBuilderFactory;
    
    public class XMLViewer extends UiApplication {
    
      MainScreen _screen = new MainScreen();
      public static final boolean isTest = true;
      ConnectionThread _conThread;
      public final String xmlUrl;
    
      public static void main(String args[]) {
        XMLViewer viewer = new XMLViewer();
        viewer.enterEventDispatcher();
      }
    
      public XMLViewer() {
        this.xmlUrl = "http://localhost:8080/FooXML.action";
        this._screen.setTitle("XML Viewer");
        this._screen.add(new RichTextField("Requesting update..."));
        this._screen.add(new SeparatorField());
        pushScreen(this._screen);
        this._conThread = new ConnectionThread();
        this._conThread.start();
      }
    
      public void updateField(String name, String action) {
        synchronized (Application.getEventLock()) {
          ButtonField button = new ButtonField(name,
            ButtonField.CONSUME_CLICK | ButtonField.FOCUSABLE |
            ButtonField.USE_ALL_WIDTH){
              protected boolean navigationClick(int status, int time) {
                System.out.println("Name: " + this.getLabel());
                return true;
              }
          };
          this._screen.add(button);
        }
      }
    
      private class ConnectionThread extends Thread {
        public ConnectionThread() {
          super();
        }
        public void run() {
          Document doc;
          try {
            int i,j;
            DocumentBuilderFactory docFactory =           DocumentBuilderFactory.newInstance();
            DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
            InputStream is = DataUtils.getXMLActions(xmlUrl);
            if (is == null) {
              System.out.println("InputStream is null!");
              return;
            }
            doc = docBuilder.parse(is);
            doc.getDocumentElement().normalize();
            NodeList list = doc.getElementsByTagName("action");
            for (i=0;i
    

    I get this result:

    HTTP STATUS OKItem: 1 has name: name has text: null has value: nullItem: 3 has name: url has text: null has value: null
    

    You can see this link, it may be useful for you

    http://supportforums.BlackBerry.com/T5/Java-development/help-with-parsing-XML-XMLParseDemo-Java/TD-p...

  • Loading the XML file with the missing elements dynamically by ODI

    Hi guys,.

    I have the XML with two nodes Employee and address below. On a daily basis, sometimes the address element might not come from the source xml file, but my interface has columns mapped to the elements of the address, and that is why it may fail because of the source element is not found in the file or data could not get charged because the State 'and' in the sql query that is generated between the employee and address elements.  Is there a way where I can load the data dynamically where I can search in the file only for items (used) present and dynamically loading data only for these items?

    XML file:

    <? XML version = "1.0" encoding = "UTF-8"? >

    < EMP >

    < Empsch >

    < employee >

    < EmployeeID 12345 > < / EmployeeID >

    < original > t < / initials >

    John < name > < / LastName >

    DOE < FirstName > < / name >

    < / employee >

    < address >

    < > 12345 as WorkPhone < / as WorkPhone >

    < WorkAddress > test 234 < / WorkAddress >

    < / address >

    < / Empsch >

    < / EMP >

    Thank you

    Fabien Tambisetty

    I managed to solve it by using left outer joins, and in referring to the structure of the table of the XSD

  • Analysis the xml response from PL/SQL

    Can someone please help me to analyze the XML below?

    DECLARE

    l_response CLOB.

    g_system_id VARCHAR2 (255);

    g_session_id VARCHAR2 (255);

    g_user_id VARCHAR2 (255);

    BEGIN

    l_response: =.

    ' - uuid:18cb22a2 - 11cc-43f4-bfea-c213da179d30 + id = 156

    Content-ID: http://tempuri.org/0 >

    Content-Transfer-Encoding: 8 bit

    Content-Type: application/xop + xml; charset = utf-8; Type = "application/soap + xml".

    " < s: Envelope = xmlns:s ' http://www.w3.org/2003/05/soap-envelope "" xmlns: a = " " http://www.w3.org/2005/08/addressing ' > < s:Header > < a: s:mustUnderstand Action = "1" > ". http://tempuri.org/ILoginService/LoginByUserNameResponse " < / has: Action > < a: RelatesTo > urn: uuid:cf410a05 - 23 d 4 - 4B 92-a22c-329cbc19fbe7 < / has: RelatesTo > < / s:Header > < Body > < LoginByUserNameResponse xmlns =" http://tempuri.org/ ' > < LoginByUserNameResult xmlns:i = ' http://www.w3.org/2001/XMLSchema-instance "" xmlns: x = " " http://www.w3.org/2001/XMLSchema ' > < XObject.m_element i: type = "x: string" xmlns = "" > & lt; OnlineContext SystemId = "{19E0DDB4-5FA5-41EE-B624-AEA762865A6C}" SessionId = username "{F23D32A4-B325-4BFA-9E90-39CA253E843C}" = "{2C6ABE4C-D356-46F0-B4BE-9C4F0A36A522}" / & gt; < XObject.m_element > < / LoginByUserNameResult > < / LoginByUserNameResponse > < / Body > < / s: Envelope >

    -uuid: 18cb22a2-11cc-43f4-bfea-c213da179d30 + id = 156-';

    SELECT systemid, sessionid, userid

    IN g_session_id, g_system_id, g_user_id

    FROM XMLTABLE)

    xmlnamespaces ('http://www.w3.org/2003/05/soap-envelope' 'DATA'),

    'data:LoginByUserNameResponse/LoginByUserNameResult/XObject.m_element/OnlineContext '.

    PASSAGE xmltype (l_response)

    Systemid VARCHAR2 COLUMNS (50) PATH "@OnlineContext."

    SessionId VARCHAR2 (50) PATH "@OnlineContext."

    UserID VARCHAR2 (50) PATH "@OnlineContext") xt;

    Dbms_output.put_line)

    "Session Id".

    || g_session_id

    || "System Id".

    || g_system_id

    || "User Id".

    || g_user_id);

    END;

    Thank you.

    It gets you a little closer

    declare
    -- Local variables here
    l_response     CLOB;
    g_system_id    VARCHAR2 (255);
    g_session_id   VARCHAR2 (255);
    g_user_id      VARCHAR2 (255); 
    
    begin
    -- Test statements here
    l_response := '
    
        http://tempuri.org/ILoginService/LoginByUserNameResponse
        urn:uuid:cf410a05-23d4-4b92-a22c-329cbc19fbe7
    
    
        
           
              
              
          
      
    '; 
    
        SELECT systemid, sessionid, userid
          INTO g_session_id, g_system_id, g_user_id
          FROM XMLTABLE (
                  xmlnamespaces ('http://www.w3.org/2003/05/soap-envelope' AS "s",
                                 'http://tempuri.org/' as "data"),
                  's:Envelope/s:Body/data:LoginByUserNameResponse/data:LoginByUserNameResult/XObject.m_element/OnlineContext'
                  PASSING xmltype (l_response)
                  COLUMNS systemid VARCHAR2 (50) PATH '@SystemId',
                          sessionid VARCHAR2 (50) PATH '@SessionId',
                          userid VARCHAR2 (50) PATH '@UserId') xt; 
    
    DBMS_OUTPUT.put_line (
           'Session id '
        || g_session_id
        || ' System id '
        || g_system_id
        || ' User id '
        || g_user_id); 
    
    end;     
    

    You will need to manually parse as CLOB and pull the XML itself of the response string.  This can be done via SUBSTR and INSTR looking for the first < and="" last=""> in that you showed at least.  Upgrading from a previous version of working correctly with the xmlns = "", which redefines the default namespace to the default value. "  The XPath has been corrected to reflect using the appropriate prefix.

  • Using the XML API

    Hi all.

    I'm brand new contract management module and the api XML. I going through the XMLAPI.chm but could not understand where to start. If anyone can help me with a simple program that I can run to understand the API XML which will help. Any pointer will help you.

    Thanks in advance.
    Sachin

    Hello, the API is just a servlet which receive a XML, using XMLAPI especified.
    To call the api, you must call a call on this http://server/exponline/XmlServlet with the parameter xmlQuery post url

    Here's an example of my method of connector

    public InputStream sendRequisition (XmlRequest xml) throws IOException {}

    If (conn == null) {}
    throw new RuntimeException ("not connected.");
    }

    OutputStreamWriter out = new OutputStreamWriter (conn.getOutputStream ());
    out. Flush();
    out. Write ("xmlQuery =" + xml.encode ());
    out. Close();

    Return conn.getInputStream ();
    }

    the XmlRequest is just an XML encoder, a subclass of my xml queries (I do classes to the best use)
    all you have to do is analyze the XML InputStream it returns.

    Request login example

    xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation = "http://app.expedition.com/ http://127.0.0.1/exponline/xml-schemas/loginrequest.xsd" >

    EXP

    EXP

    CMPROJ

    applications must sessionId, that his return to the connect call, but this is especified on Documentation

    Good luck

    Published by: user12718422 on 03/03/2010 05:22

  • RTF model: If condition to test the XML tag exists only on the current XML node

    Hello

    I have a RICH model based on an XML file as follows:
    + < invoice > +.
    + < InvoiceNum >... < / InvoiceNum > +.
    + < ShipAddress >... < / ShipAddress > +.
    + < order > +.
    + < OrderNum >... < / OrderNum > +.
    + < ShipAddress >... < / ShipAddress > +.
    + < / order > +.
    + < order > +.
    + < OrderNum >... < / OrderNum > +.
    + < ShipAddress >... < / ShipAddress > +.
    + < / order > +.
    + < / invoice > +.

    As you can see, the tag * < ShipAddress > * there are two
    -Sub * < invoice > * = > global shipping address
    -Sub * < Order > * = > shipping address to you for Sales Order

    In an XML file, I can only have < ShipAddress > at a certain level, for example
    -the tag * < invoice > < ShipAddress > * appear in XML that if we have a unique address for the invoice
    -the tag * < order > < ShipAddress > * appear in XML that if we have more than one address for the invoice

    Logically, in my RTF model, I want to print the address of delivery at the level if one header tag * < invoice > < ShipAddress > * is in XML format.
    I tried a lot of syntax If but none works according to the needs:
    + <? If.: / ShipAddress? > + = > always returns FALSE
    + <? If: / / ShipAddress? > = > returns TRUE when < order > < ShipAddress > exists
    + <? If: ShipAddress? > = > returns TRUE when < order > < ShipAddress > exists

    The only syntax that seems to work is:
    + <? If: / / Bill/ShipAddress? > +.
    But I prefer not not hardocde the name of the top-level tag.

    Question:
    What si syntax to test the existence of a XML tag only in the current node (recursively)?

    Thanks in advance for helping me.
    K.Helali

    ShipAddress for the invoice

    
    

    ShipAddress order

    
    
  • Retrieve / search a specific node of the XML file

    Hello

    I have a question about reading the XML (search) in PL SQL file:

    There is an XML file with the following structure:
    <root>
      <Hnode1 attr1="value1" />
      <Hnode2 attr1="value1" /> 
         <node1_of_Hnode2 id="10" personname="Steven"/>
         <node2_of_Hnode2 id="20" personname="Christian"/>
         <node3_of_Hnode2 id="30" personname="Arnold"/>
         .
         .
      <Hnode2/>
    <root/>
    How it is possible to filter a node by one of its attribute value. For example:
    The id of a person - I guess that id = 20. In this case I would like to get the whole node (in this case node2_of_Hnode2) to get the personname = > 'Christian '.
    Just like a SELECT statement (WHERE ID = 20)

    Is it possible to get it in a single order or should it be buckled on all the lines in the Document. Can you please provide an example for me.

    Thank you for advice!

    The basic version is 10.

    Sorry, this is not a version.
    For example:

    SQL> select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE     10.2.0.5.0     Production
    TNS for 64-bit Windows: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
     
    

    The use of the extraction of the values?
    1. better in a Select statement. assignment directli in a variable, or by using the xmlquery function?

    PL/SQL or SQL calls to the XMLType methods such as getStringVal() or extract() function should be equivalent (save the change of context).
    However, none of them are the right way to retrieve a scalar value of a given node.
    You must use the rather extractValue() function (SQL only) for immediate release< 11.2="" and="" xmlcast/xmlquery="" starting="" with="">

    Another Question:

    I've seen a lot of options for dealing with XML files.

    In my case only query data in XML files is relevant.

    I've seen to many API called XMLDOM, DMBS_XMLDOM, XMLTYPE...

    When to use these APIs. Can you give me feedback on this please?

    It is a broad topic.
    An appropriate response will depend on your condition.

    -You have to deal with large files and if so what size?
    -Performance/memory management is a concern for you?
    -You want to extract unique values or process the XML content in the form of relational data?

    If you have any specific test cases to show us, please post in the {forum: id = 34} forum and make sure to include all the necessary details (see the FAQ).

    Published by: odie_63 on 23 Feb. 2012 11:35

  • Problem with to access the XML nodes whose namespace

    Hello
    I have a XML file with the following format;

    "" "" "< graphml version ="1.3"xmlns =" http://graphml.graphdrawing.org/xmlns/graphml ' xmlns:y = ' http://www.yworks.com/xml/graphml ' xmlns: xsi = " http://www.w3.org/2001/XMLSchema-instance" > "

    < graph id = 'G' edgedefault 'ordered' = >

    < key data 'd11' = >
    < y: SharedData >
    < name there: Brush = "SolidBrush" color = "Black" id = "1" / >
    < / y: SharedData >
    < / data >

    < node id = "G:n0" >
    < y: Labels >
    < y: Text > <! [CDATA [start]] > < / Text: y >
    < / y: Labels >
    < / node >

    < node id = "G:n1" >
    < y: Labels >
    < y: Text > <! [CDATA [end]] > < / Text: y >
    < / y: Labels >
    < / node >

    < / chart >

    < / graphml >


    I access this file as < mx:XML id = "layoutXml" source = "tmp.xml" / > "

    I have no application debugging and found that the layoutXml object contains the xml file as it is. Now when I try to access any child node of layoutXml, every time I found null. Same instruction layoutXml.graph.toXMLString () or layoutXml.graph.toString () returns null.

    I have tryied the following approach as well, but did not work,
    var nameSpace:Namespace = new Namespace (" http://www.yworks.com/xml/graphml");
    var str:String = layoutXml.graph.node. (@id == ' G:n0").nameSpace::Labels.nameSpace::Text.toXMLString();")
    also, this property returns null.

    If anyone has the solution, please answer.

    Thank you.

    Namespace var sets default namespace:
    lack of namespace xml = nameSpace;

    You should then be able to reference nodes normally.

    Tracy

  • VI Analyzer: the wire under the test object fails with call library function nodes

    Hello

    If I have a knot of function call with an ErrorIn and an ErrorOut library, the VI thread Test Analyzer "Thread under object" always fails with two hits in a library function node call.

    Double click to the salient facts occurrence lines error related to the call... node.

    The test fails, if the error lines are not connected.

    Thank you!

    H

    Sorry, created the CAR number is #208992.

    Kind regards

    Michael

Maybe you are looking for

  • asking Siri 'open drive' opens the activity rather

    When I ask Siri "open workout" on my Apple Watch, it opens 'activity' instead.  It's a watch again - it is a replacement for my first watch which was replaced under apple care.  On my first watch, Siri worked perfectly.  Everything opened correctly w

  • The printer "communication not available" error in Windows 7

    Printer Communication errors__My printer worked fine for the last 2 years - now get "communication not available" - reinstalling printer with manufacturing CD etc. - tried to download the latest drivers, might work once & then the next time I get the

  • Unable to play media files

    Problem of media files I have the problem on the following computer: Windows Vista does not recognize the media files (audio, mp3, files videp). I tried to use also other players (winamp, video live), the result is the same, no game.

  • I can't find windows Explorer where it is

    I can't find windows Explorer where is it?

  • search for buttons

    Hello I see here that there is a function to search for a character string field http://docs.BlackBerry.com/en/developers/deliverables/18125/Search_field_1214696_11.jsp can do to the list of buttons? as Button1 Button2 Button3 Button4 button5 If rese