problem write/read an xml file

Hello world

IM using ksoap library to access my webservice, if everything is ok, my webservice returns an xml file, then I use this file to show some information in my application.

In the Simulator, everything works perfectly (BB simulator_5.0.0.411_8900), but in a real BB does not work, the app show me a NullPointerException.

Anyone has an idea about this?

public void CargaDatosIniciales(){

    String result="";

    String serviceUrl = "http://myserver.com/blackberry/soap.php";
    String serviceNamespace ="http://myserver.com/blackberry/soap.php";
    String soapAction = "http://myserver.com/blackberry/soap.php?wsdl";

    rpc = new SoapObject(serviceNamespace,"cargarVideos");
    rpc.addProperty("Login", usr);
    rpc.addProperty("Password", password);
    rpc.addProperty("user_agent", userAgent);

    try{
        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        envelope.bodyOut = rpc;
        envelope.dotNet = false;
        envelope.encodingStyle = SoapSerializationEnvelope.XSD;

        HttpTransport ht = new HttpTransport(serviceUrl);
        ht.debug = true;
        ht.call(soapAction, envelope);
        result = (envelope.getResult()).toString();
        writeXML(result,1);

    }catch(Exception e){

    }

}
private void writeXML(String result,int f) {

    String URL = "file:///SDCard/BlackBerry/documents/";
    String filename="";
    if(f==1){

        filename = "datosXML.xml";
    }

....
    String fName=URL+filename;
    try {
         DataOutputStream os = null;
            FileConnection fconn = null;
            try {
                    fconn = (FileConnection) Connector.open(fName, Connector.READ_WRITE);
                    if (!fconn.exists()){
                        fconn.create();
                    }
                        fconn.delete();
                        fconn.create();

                    os = fconn.openDataOutputStream();
                    os.write(result.getBytes());
            } catch (IOException e) {
                    System.out.println(e.getMessage());
            } finally {
                    try {

                        if (null != os)
                                    os.close();
                            if (null != fconn)
                                    fconn.close();
                    } catch (IOException e) {
                            System.out.println(e.getMessage());
                    }
            }

    } catch ( Exception e ) {

    }      

}

PD: Sorry for my English.

In most cases, 'deviceside = true' does not work unless it is accompanied by specific carrier APN info.

The AFN must be defined in the parameters of TCP devcie or added to your URL.

See the following article:

http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

.. and this one:

http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/How_To _...

Tags: BlackBerry Developers

Similar Questions

  • Reading an XML file and write the content in another file xml in java

    Hello

    I'm new to xml parsing. My requirement is that I get a message (xml) using ibm MQ in the ByteArrayInputStream format. I read this xml message and write to another file.

    To do this, I create a CEP.

    First of all, I used simple reading and writing concept, but the output is "java.io.FileInputStream@3e25a5".
    Example of xml file
    -< customer >
    < > 1234 ClientId < / ClientId >
    STechnology < ClientName > < / ClientName >
    < DTU_ID > 567 < / DTU_ID >
    < ClientStatus > ACTIVE < / ClientStatus >
    -< LEAccount >
    < Customer > 678989 < / customer >
    < > 56743 LEId < / LEId >
    -< account >
    < AccountNumber > 9876543678 < / account number >
    < / account >
    < / LEAccount >
    -< Service >
    Y2Y < Cindicator > < / Cindicator >
    < PrefCode > 980 < / PrefCode >
    < BSCode > 876 < / BSCode >
    < MandatoryContent > MSP < / MandatoryContent >
    < / service >
    < / customer >

    Code:


    import java.io.ByteArrayInputStream;
    import java.io.FileInputStream;
    to import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;

    public class ByteArrayInputStreamToXml {}

    Public Shared Sub main (String [] GIS) throws IOException {}

    InputStream inputStream = new FileInputStream("C:\\soft\\test2\\sample1.xml");
    currentXMLBytes Byte = inputStream.toString () .getBytes ();
    ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream (currentXMLBytes);

    OutputStream out = new FileOutputStream("C:\\soft\\test\\data.xml");
    int read = 0;
    ubyte bytes [] = new byte [1024];

    While ((read = byteArrayInputStream.read (bytes))! = - 1) {}
    out. Write (bytes, 0, read);
    out. Write ("\n");
    }

    inputStream.close ();
    out. Flush();
    out. Close();

    System.out.println ("new file created!");

    }

    }

    Please suggest me how can I use DOM/SAX parser, I see several code on the net to read the xml file using SAX/DOM parser, but write an xml file after reading using ByteArrayInputStream I don't get. Assistance through some link examples will also be useful for me.

    Thank you
    Sumit

    Published by: user8687839 on April 30, 2012 02:37

    Published by: user8687839 on April 30, 2012 02:43

    user8687839 wrote:
    But the file is coming thanks to a queue and byte format. Must read the byte, and write to a file. So, how I tried to read the byte using the code above. Please suggest me the correct way.

    Simply write the bytes of the contents of the queue directly to a FileOutputStream. Still no need to SAX or DOM!

    Pseudo-code-

    Open a FileOutputStream .
    
    Until all the bytes of the queue have been read
        read some bytes from the queue.
        wite these bytes to the FileOutputStream.
    
    Close the FileOutputStream.
    

    Published by: sabre150 on April 30, 2012 11:30

  • OSB: How to read the xml file, which is in OSB project

    Hello

    We have a generic proxy (PG1) reporting and deals alerts, this proxy is called in the pipelines of proxies anothers (P1... PN) in several projects. Each client proxy (P1... PN) PN) before call proxy PG1, configures a variable with syntactic alert or report.

    We thought it would be a good idea to store the specifications for all the proxies of a project as an xml file, so that the proxy PG could read the xml file. This file will be in the OSB project.

    The questions are:
    -proxy can read a xml file that is in the OSB project?
    S ' Please, are all the documentation for this?

    Thank you

    Kind regards

    You can always do customization to work with the properties defined in a XML xquery. The key to this is to use the customization of reference instead of find and replace the customization, similar to the service account customizations.
    Keep your real estate to as properties_dev of env xquery specific xmls, properties_sit etc then apply customization of service proxy xquery reference reference specific correct env.

  • Reading an xml file

    Hi all

    I want to read an xml file and add that a large number of boxes with the names specified in xml.

    Can someone please share a working code example please

    Thank you

    Lima

    If this post answers your question or assistance, please mark it as such.

    Greg Lafrance - Flex 2 and 3 certified ACE

    www.ChikaraDev.com

    Flex / development, training, AIR and Support Services

    
    
      
      
      
        
      
    
    
    
    
      check1
    
      check2
    
      check3
    
    
    
  • Problem using: read the spreadsheet file

    Hello

    I have 2 problems with reading spreadsheet file:

    (1) for the use of .txt file I can get the first column and not the other (even if I chose the correct output...)

    (2) this does not at all when you use my .xls file

    I must do something wrong but can't find what...

    Has anyone an idea?

    I have attached the .VI and my two files.

    Thank you

    User

    A native Excel file is NOT a text file.  It is a format of custom file created by Microsoft.  This is why you must use ActiveX to interact with him.

    The worksheet ' ' folder features found in the work of LabVIEW with text files (delimited by tabs, CSV, etc.).  The text files are a format more generic that can be read by programs such as Notepad.  Tried to use Notepad to open an .xls file?  It does not work.  Excel can open a text file, because it is a generic format.

    So even if everyone automatically thinks "Excel" when they see the word "Spreadsheet", the two are not synonymous.  In the case of LabVIEW, 'Spreadsheet' made reference to a delimited text file.

    Who is?

  • Need help to read the xml file and place it in a table.

    Nice day!

    Here is the configuration. I have a xml file from another source which will call a stored procedure in my database (which I am supposed to create). This is a first for me, I've never done development pl/sql or worked with xml. :(

    That's what I hoped to accomplish, if there is a better way, that I am open to him.
    In short, to have a stored procedure that takes the xml file (transmitted by third parties via the call, no url must be a file), creates a temporary table and populates the two columns needed. Then, the SP will make a select join with the temporary table and other data available in another schema. Once the completed table selection will be truncated and dropped. SP farm.

    Details:
    DB: Oracle 11.2.0.1 RAC.
    Charset: AL32UTF8
    Example of XML: (nearly 10,000 lines like this in production)
    "< MerchantID report =" "#" name = 'Conversion detail report' ReportStartDate = '2011-09-27 12:00:00GMT' ReportEndDate = '2011-09-27 21:38:13GMT"Version ="1.1"> < Conversion = '1234567891234567 D' MerchantReferenceNumber Convertingdate =" 2011-09-27 13:39:02 "RequestID ="1234567891234567891234"> < OriginalDecision > REVIEW < / OriginalDecision > < NewDecision > ACCEPT < / NewDecision > < Reviewer > testusr < / examiner > < ReviewerComments > no reason to reject. < / ReviewerComments > < Notes > < Note Date = "2011-09-27 13:39:02" AddedBy = "testusr" comment = "Took possession" / > < / Notes > < queue > Digital Review < / queue > < profile > Digital orders QA < / profile > < / Conversion > "
    ...
    < / report >

    What I tried.
    I found a tutorial: http://it.toolbox.com/blogs/oracle-guide/oracle-and-xml-in-action-a-real-world-example-5319 I tried and was able to make it work. But I could not duplicate the results with my xml file. So I looked away and have had no success. :( I'm not a developer, so I'm really bad...

    I found a note of support: (how to load an XML file into a Database Table using DBMS_XMLSave unaided Bfile [227476.1 ID]) and couldn't make it work.

    I found some online then Odie son xml and tried these but slipped and couldn't get my versions of these great answers to work for me.

    Then... I'm here now and hoping that someone could walk me through this.


    I tinkered this SP (it doesn't have to be that way, the suggestions are greatly appreciated)

    create or replace procedure xml_to_table (call_1 call_2) as

    Start
    run immediately "CREATE GLOBAL TEMPORARY TABLE XMLType IMRPT
    --(clé primaire contrainte-imrpt_pk (MerchantReferenceNumber))
    XmlType store as xml binary basicfile
    -(high compression)
    virtual columns
    (MerchantReferenceNumber as (xmlcast (xmlquery ('/ Conversion/MerchantReferenceNumber ' from object_value content back) as VARCHAR2 (32))))
    , NewDecision as (xmlcast (xmlquery ('/ Conversion/NewDecision ' from object_value content back) as VARCHAR2 (10)))
    )
    -ON COMMIT PRESERVE ROWS

    run immediately 'save xml as a file on the local system?'

    insert into IMRPT (MerchantReferenceNumber, NewDecision)

    run immediately "join select statement.
    run immediately 'truncate table IMRPT.
    run immediately "drop table IMRTP.

    end;
    /

    On my last test, I tried to select just in the xml file using this:

    DECLARE
    indomdoc DBMS_XMLDOM. DOMDocument;
    innode DBMS_XMLDOM. DOMNode;
    myParser DBMS_XMLPARSER.parser;
    buf VARCHAR2 (2000);
    BEGIN
    myParser: = DBMS_XMLPARSER.newParser;

    DBMS_XMLPARSER.setBaseDir (myparser, 'XML_DIR');
    DBMS_XMLPARSER. Parse (myParser, "test.xml");

    indomdoc: = DBMS_XMLPARSER.getDocument (myParser);

    -just to test content
    innode: = DBMS_XMLDOM.makeNode (indomdoc);
    DBMS_XMLDOM.writeToBuffer (innode, buf);
    Dbms_output.put_line (BUF);

    dbms_xmldom.freeDocument (indomdoc);
    dbms_xmlparser.freeParser (myParser);
    END;
    /

    It was another accident and burn.

    Any help would be appreciated.

    Thank you

    Like I said:

    Here is an example using a REF CURSOR variable ( you will need to declare a plus for your actual procedure )

    Your procedure has two parameters, you must declare two variables to hold the two REF CURSOR ;)

    DECLARE
    
      v_filename      VARCHAR2(50) := 'DMReport.xml';
      v_rc1            SYS_REFCURSOR;
      v_rc2            SYS_REFCURSOR;
    
      v_order_name       VARCHAR2(100);
      v_reason_text      VARCHAR2(100);
    
    BEGIN
    
      xml2table(v_filename, v_rc1, v_rc2);
    
      commit;
    
      loop
        fetch v_rc1 into v_order_name;
        exit when v_rc1%notfound;
        dbms_output.put_line('ORDER_NAME='||v_order_name);
      end loop;
    
      close v_rc1;
    
      loop
        fetch v_rc2 into v_order_name, v_reason_text;
        exit when v_rc2%notfound;
        dbms_output.put_line('ORDER_NAME='||v_order_name||', REASON_TEXT='||v_reason_text);
      end loop;
    
      close v_rc2;
    
    END;
    /
    

    If you test this in SQL * Plus, do not forget to SET SERVEROUTPUT ON to see the result.

  • having a problem with parsing the XML file

    Hi all
    I am trying to get data from XML file
    I want to only 4-5 values in this XML file
    Here is an example of XML file
    -< transaction >
    -< TransCtx >
    > < pAMETranType > IRCVACAPPROVAL < / pAMETranType >
    > < / TransCtx >
    > < / transaction >

    I want to add value and to store this value in table
    I'm here, I want to "IRCVACAPPROVAL".
    the tag
    < pAMETranType >

    for this purpose


    I created a procedure

    CREATE OR REPLACE PROCEDURE insert_xml_emps (p_directory in varchar2,
    > p_filename in varchar2)
    (> vtableName in varchar2) as
    > v_filelocator BFILE.
    > v_cloblocator CLOB.
    > l_ctx DBMS_XMLSTORE. CTXTYPE;
    > l_rows NUMBER;
    > v_amount_to_load NUMBER;
    > dest_offset NUMBER: = 1;
    > offset NUMBER: = 1;
    > lang_context NUMBER: = DBMS_LOB. DEFAULT_LANG_CTX;
    > WARNING NUMBER;
    > START
    > dbms_lob.createtemporary (v_cloblocator, true);
    > v_filelocator: = bfilename (p_directory, p_filename);
    > dbms_lob.open (v_filelocator, dbms_lob.file_readonly);
    > v_amount_to_load: = DBMS_LOB.getlength (v_filelocator);
    >-* this line is changed * -.
    > DBMS_LOB. LOADCLOBFROMFILE (v_cloblocator,
    > v_filelocator.
    > v_amount_to_load.
    > dest_offset.
    > offset.
    > 0,
    > lang_context.
    (> warning);
    >
    > l_ctx: = DBMS_XMLSTORE.newContext (vTableName);
    > DBMS_XMLSTORE.setRowTag (l_ctx, 'TRANSACTION');
    > DBMS_XMLSTORE.setRowTag (l_ctx, 'TRANSCTX');
    >-clear the update settings
    > DBMS_XMLStore.clearUpdateColumnList (l_ctx);
    >-set the columns to update a list of values
    > DBMS_XMLStore.setUpdateColumn (l_ctx, 'PAMETRANTYPE');
    >
    >-now insert the doc.
    > l_rows: = DBMS_XMLSTORE.insertxml (l_ctx, v_cloblocator);
    > DBMS_XMLSTORE.closeContext (l_ctx);
    > dbms_output.put_line(l_rows ||) "... inserted rows. ») ;
    > dbms_lob.close (v_filelocator);
    > DBMS_LOB. FREETEMPORARY (v_cloblocator);
    > END;

    I also have on the table who get this value

    whenever I call that created the procedure
    it sometime gives an error or sometime run correctly but store null in the table


    But when I change the XML file
    as
    When convert all lowercase letters in the capital then it works fine

    Is tehre to other ways to parse the XML file with no change in the XML file?

    Did you use the same test (with the exception of file name and directory) case?

    What I posted is a copy/paste direct SQL * Plus, and it works on version 11.2.0.1.

  • How reference/read an XML file?

    Instead of the inline XML content, pls see code below, thank you.

    <? XML version = "1.0"? >
    <!-dpcontrols / DataGridSimple.mxml->
    "< mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml" > "
    <!--
    < mx:XMLList id = "employees" >
    < employee >
    < name > Christina Coenraets < / name >
    555-219-2270 < phone > < / phone >
    < email > [email protected] < / email >
    true < current > < / current >
    < notes >
    Christina is a hot chic.
    < / notes >
    < / employee >
    < employee >
    < name > Joanne Wall < / name >
    555-219-2012 < phone > < / phone >
    < email > [email protected] < / email >
    true < current > < / current >
    < notes >
    What a and b!
    < / notes >
    < / employee >
    < employee >
    < name > Maurice Smith < / name >
    555-219-2012 < phone > < / phone >
    < email > [email protected] < / email >
    < active > false < / current >
    < notes >
    Just a pimp.
    < / notes >
    < / employee >
    < employee >
    < name > Mary Jones < / name >
    555-219-2000 < phone > < / phone >
    < email > [email protected] < / email >
    true < current > < / current >
    < notes >
    Mary, Mary, Mary
    < / notes >
    < / employee >
    < / mx:XMLList >
    ->
    < mx:Panel title = "DataGrid Control Example" height = "100%" width = "100%".
    paddingTop = "10" paddingLeft = "10" paddingRight = "10" >

    < mx:Label width = '100% ', color = 'blue '.
    Text = "Select a row in the DataGrid control" / >

    <!-old reference inline, dataProvider = {employees}->
    {< mx:DataGrid id = "dg" width = "100%" height = "100%" rowCount = "5" dataProvider="{C:\ColdFusion8\wwwroot\Flex\employees.xml}" > "
    <!-this above dataProvider reference will not work, how? ->
    < mx:columns >
    < mx:DataGridColumn dataField = "name" headerText = "Name" / >
    < mx:DataGridColumn dataField = "phone" headerText = "Phone" / >
    < mx:DataGridColumn dataField = "email" headerText = "Email" / >
    < / mx:columns >
    < / mx:DataGrid >

    < mx:Form width = '100 percent"height ="100% ">
    < mx:FormItem label = "Name" >
    < mx:Label text="{dg.selectedItem.name}"/ >
    < / mx:FormItem >
    < mx:FormItem label = "Email" >
    < mx:Label text="{dg.selectedItem.email}"/ >
    < / mx:FormItem >
    < mx:FormItem label = 'Phone' >
    < mx:Label text="{dg.selectedItem.phone}"/ >
    < / mx:FormItem >
    < mx:FormItem label = 'Notes' >
    < mx:Label text="{dg.selectedItem.notes}"/ >
    < / mx:FormItem >
    < / mx:Form >

    < / mx:Panel >

    < / mx:Application >

    in DataGrid dataProvider attribute does not point to a file. He uses (I think) E4X to set a path to a data provider (i.e. HTTPService). You need to access the XML file using a provider of data first and then use this reference to access the data of the element in the document through the dataProvider.

    Hope that helps a little.

  • Read an XML file with elements of namespace

    I'm a beginner with XML and for the first time that I have to read a file with columns.

    I try this code, but the result is always the same: no selected lines.

    variable xml_response VARCHAR2 (4000)


    START


    : xml_response :=

    '

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

    " < ROOT xmlns =" http://www.post.ch/schemas/DFU/2006/20/Report11 ">

    < sender SenderID = SenderName "1618" = "Laurastar SA" ReportCreated = "20141120053155" >

    < provider ProviderID = "539ADAEE-FF18-49F8-84B8-B90232CBCC61" ProviderName = "Consignments" >

    < data >

    < item SendingID = "a68f0007-c4df-4ecb-8dfe-d6da6c2e0cda" ItemID = IdentCode "5430243" = "993314781300000254" / >

    < item SendingID = "beba5a0e-6363-42f1-aeb5-51c5171ed032" ItemID = IdentCode "5430241" = "993314781300000255" / >

    < item SendingID = "beba5a0e-6363-42f1-aeb5-51c5171ed032" ItemID = IdentCode "5430241" = "993314781300000255" / >

    < / data >

    < / provider >

    < / sender >

    < / ROOT > ';



    END;


    /


    SELECT x .*

       FROM XMLTable ( )

       '/ ROOT'

    from xmltype (:xml_response)

    columns

    ReportCreated VARCHAR2 (30) way "Sender/@ReportCreated"

    , SendingID varchar2()50() way "Sender/Provider/Data/Item/@SendingID"

    , ItemID varchar2()30) way "Sender/Provider/Data/Item/@ItemID"

    , IdentCode varchar2()30) way "Sender/Provider/Data/Item/@IdentCode"

       ) x

       ;


    I would not find what the problem is.



    I could not found what the problem is.

    Two things are wrong:

    (1) the lack of namespace declaration

    (2) that you are trying to project expandable nodes into a single line

    This should work:

    SELECT x1.ReportCreated
         , x2.*
    FROM XMLTable(
           XMLNamespaces(default 'http://www.post.ch/schemas/dfu/2006/20/Report11')
         , '/ROOT/Sender'
           passing xmltype(:xml_response)
           columns
             ReportCreated varchar2(30) path '@ReportCreated'
           , items         xmltype      path 'Provider/Data/Item'
         ) x1
       , XMLTable(
           XMLNamespaces(default 'http://www.post.ch/schemas/dfu/2006/20/Report11')
         , 'Item'
           passing x1.items
           columns
             SendingID     varchar2(50)  path '@SendingID'
           , ItemID        varchar2(30)  path '@ItemID'
           , IdentCode     varchar2(30)  path '@IdentCode'
         ) x2
    ;
    
  • I have a problem with reading. WAV files.

    So I tried to mix these sounds to make cool music, but when I open something like Audacity, it sounds completely different when played in windows media player, I am really confused. Has it to do with codecs or bit rate or something like that? Any help is appreciated. Thank you!

    Evan,

    What is the version of Windows installed on the computer?

    Is the question limited to Audacity?

    I'd like you try to play different music files.

    In addition, I would have you read these articles.

    http://support.Microsoft.com/kb/316992#top

    http://Windows.Microsoft.com/en-us/Windows/codecs-frequently-asked-questions#codecs-frequently-asked-questions=Windows-7

    We know if that helps you.

  • Read and write XML files

    I'm working on a Flex application that will be used to save the entries concerning the manufacturing plan. I have two problems to solve:

    1 - can read an XML file to a local drive? (C:/temp/file)

    2. If the system where I call the web service is in offline mode, I have to create a local file that will be read vwhen later, that the system will be in place. How can I create a local file from Flex?

    A web-based application cannot access the local drive without the user's permission.

    Sometimes, people download local files to a server (as demanding as the user

    approval) and then request the file from the server.

    You can use local SharedObject to store data, although there are limits to

    the amount of data.

    The recommended option is to create an AIR application.  He will be able to access

    the local disk after installation.

  • Reading XML file problem

    Hi all

    I'm reading an xml file and displays the output. I get a blank screen. Can someone help me please.

    Thanks in advance

    I can't attach the xml file. Since this is not a valid extension. Please find the following xml code.


    Samsung

    Busan
    South Korea

    If you can change the saved .xml file, you can modify it to be compatible with Labview XML shema and use Unflatten of XML as in your VI. If you can't, you must use the XML parser library. Attached, you will find 2 exmaples for these situations.

  • XML file reading problems

    Hi all

    I have trouble reading the XML file. I think I did the request of right except the return results are empty and I don't know why?

    Version = database Oracle 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production

    XML file: E_table_export_CES.xml

    <? XML version = "1.0" encoding = "UTF - 8"? >
    < RESULTS >
    < ROW >
    < COLUMN NAME = "ID" > 12688f8ac8aa6310VgnVCM10000078ccc70a___ < / COLUMN >
    < COLUMN NAME = "BRANCH_NAME" > Brooklyn < / COLUMN >
    < / ROW >
    < / RESULTS >

    CREATE DIRECTORY XMLDIRX AS ' / DBMS/xml ";

    The query I use:

    Select *.
    FROM xmltable ('* / ROW ')
    from XMLTYPE (bfilename ('XMLDIRX', 'E_table_export_CES.xml'), NLS_CHARSET_ID ('UTF8'))
    columns
    'ID' VARCHAR2 (200) path '@ID '.
    , Path of varchar2 (25) "BRANCH_NAME'"@BRANCH_NAME ".
    ) xtbl

    I'm back columns ID and Branch_Name, but the line is empty. Just do not know what I am doing wrong. Any help would be greatly appreciated!

    Hello

    I'll try to move things to see if I can recover the data, but any help would be appreciated.

    Do not try things randomly, it's all logic very :)

    SQL> select x.*
      2  from xmltable(
      3         '/RESULTS/ROW'
      4         passing xmltype(bfilename('TEST_DIR', 'E_table_export_CES.xml'), nls_charset_id('AL32UTF8'))
      5         columns
      6           "ID"          varchar2(200) path 'COLUMN[@NAME="ID"]'
      7         , "BRANCH_NAME" varchar2(25)  path 'COLUMN[@NAME="BRANCH_NAME"]'
      8       ) x ;
    
    ID                                                                               BRANCH_NAME
    -------------------------------------------------------------------------------- -------------------------
    12688f8ac8aa6310VgnVCM10000078ccc70a____                                         Brooklyn
     
    

    The main XQuery retrieves each ROW as a sequence, then each element of this sequence is passed to the COLUMNS clause to be broken as distinct relational columns, depending on the specified path expression.
    [For example, the path "COLUMN[@NAME="ID "]' means: extract the child node of COLUMN (of LINE) whose NAME attribute value is 'ID', and since specify us a scalar data type for the projection, the actual value - in this case, the text() - of the COLUMN element node is returned.

  • Write several bays in one xml file at different times without overwriting the old file?

    Hi my name is Dustin,

    I am new to labview and teststand... I try several tables of data in a single XML right. I can do this with a cluster but I need to create a variable for each of these pictures (21 pictures) and I was hoping to use the same variable for each table. Which means that I get my data table write in an xml file and replace this table in this variable with a new table and then call my VI who writes this table in an xml file and write to the same file xml under the first table without crushing. My VI I created to write a table to an xml file is attached. Yet once I wonder if there is a way to write several berries in a single at different times xml file, without overwriting the old file xml.

    Thank you

    Hi dlovell,

    See the attached example. I think he can help you.

    Kind regards
    Nitz

    (Bravo to give good answers, mark it as a Solution If your problem is resolved)

  • Reading XML File.vi returns an empty string

    Hello

    I use reading of XML File.vi and this VI returns an empty string on my XML file, but on another XML file, it seems to work correctly.

    I open my file XML in Internet Explorer 7.0 and it apears as aspected.

    What could be the problem?

    Thanks in advance for any help.

    Kind regards

    Daniel Coelho

    You are right, and it seems to work as I want.

    Thank you for your help, this LabXML works well.

    This post is officially solved

    My best regards,

    Daniel Coelho

Maybe you are looking for