Output data type of Read from XML file.vi

LV 7.1:
How can I enforce the output data type of the polymorphic "Read from XML file.vi" to be a string instead of an array of strings?

ahlers01 wrote:
LV 7.1:
How can I enforce the output data type of the polymorphic "Read from XML file.vi" to be a string instead of an array of strings?
In reply to my own post:
I found the answer and described it in another forum

Similar Messages

  • Insert data into oracle table from XML file

    I need to insert data into oracle table from XML file
    If anybody handled this type of scenario, Please let me know how to insert data into oracle table from XML file
    Thanks in advance

    The XML DB forum provides the best support for XML topics related to Oracle.
    Here's the FAQ on that forum:
    XML DB FAQ
    where there are plenty of examples of shredding XML into Oracle tables and such like. ;)

  • Reading from XML file using DOM parser.

    Hi,
    I have written the following java code to read the XML file and print the values. It reads the XML file. It gets the node NAME and prints it. But it returns null when trying to get the node VALUE. I am unable to figure out why.
    Can anyone please help me with this.
    Thanks and Regards,
    Shweta
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import oracle.xml.parser.v2.*;
    import org.w3c.dom.*;
    import org.xml.sax.SAXException;
    public class ReadNodes
    private static XMLDocument mDoc;
    public ReadNodes () {
         try {
    DOMParser lParser = new DOMParser();
    URL lUrl = createURL("mot.xml");
    System.out.println("after creating the URL object ");
    lParser.setErrorStream(System.out);
    lParser.showWarnings(true);
    lParser.parse(lUrl);
    mDoc = lParser.getDocument();
         System.out.println("after creating the URL object "+mDoc);
    lParser.reset();
    } catch (Exception e) {
    e.printStackTrace();
    } // end catch block
    } // End of constructor
    public void read() throws DOMException {
    try {
         NodeList lTrans = this.mDoc.getElementsByTagName("TRANSLATION");
         for(int i=0;i<lTrans.getLength();i++) {
              NodeList lTrans1 = lTrans.item(i).getChildNodes();
              System.out.println("lTrans1.item(0).getNodeName : " + lTrans1.item(0).getNodeName());
              System.out.println("lTrans1.item(0).getNodeValue : " + lTrans1.item(0).getNodeValue());
              System.out.println("lTrans1.item(1).getNodeName : " + lTrans1.item(1).getNodeName());
              System.out.println("lTrans1.item(1).getNodeValue : " + lTrans1.item(1).getNodeValue());
         } catch (Exception e) {
         System.out.println("Exception "+e);
         e.printStackTrace();
         } catch (Throwable t) {
              System.out.println("Exception "+t);
    public static URL createURL(String pFileName) throws MalformedURLException {
    URL url = null;
    try {
    url = new URL(pFileName);
    } catch (MalformedURLException ex) {
    File f = new File(pFileName);
    String path = f.getAbsolutePath();
    String fs = System.getProperty("file.separator");
    System.out.println(" path of file : "+path +"separator " +fs);
    if (fs.length() == 1) {
    char sep = fs.charAt(0);
    if (sep != '/')
    path = path.replace(sep, '/');
    if (path.charAt(0) != '/')
    path = '/' + path;
    path = "file://" + path;
    System.out.println("path is : "+path);
    // Try again, if this throws an exception we just raise it up
    url = new URL(path);
    } // End catch block
    return url;
    } // end method create URL
    public static void main (String args[]) {
         ReadNodes mXML = new ReadNodes();
         mXML.read();
    The XML file that I am using is
    <?xml version = "1.0"?>
    <DOCUMENT>
    <LANGUAGE_TRANS>
    <TRANSLATION>
    <CODE>3</CODE>
    <VALUE>Please select a number</VALUE>
    </TRANSLATION>
    <TRANSLATION>
    <CODE>5</CODE>
    <VALUE>Patni</VALUE>
    </TRANSLATION>
    <TRANSLATION>
    <CODE>6</CODE>
    <VALUE>Status Messages</VALUE>
    </TRANSLATION>
    <TRANSLATION>
    <CODE>7</CODE>
    <VALUE>Progress</VALUE>
    </TRANSLATION>
    <TRANSLATION>
    <CODE>8</CODE>
    <VALUE>Create Data Files...</VALUE>
    </TRANSLATION>
    <TRANSLATION>
    <CODE>9</CODE>
    <VALUE>OK</VALUE>
    </TRANSLATION>
    </LANGUAGE_TRANS>
    </DOCUMENT>

    because what you want is not the node value of CODE but the node value of the text nodes into it!
    assuming only one text node into it, try this:
    System.out.println("lTrans1.item(0).getNodeName : " + lTrans1.item(0).getFirstChild().getNodeValue());

  • Reading from XML file is too slow

    I am trying to read some values from XML file, it takes about 1 or 2 minutes to finish reading, my xml file has about 4000 xml elements. Does anyone know this is normal or something wrong? How could make it faster?
    Thank you

    fine if it helps others... i hope NI will not be angry *fg*
    thx for your bug-report, i do not test the sub.vi until now.
    exchange the OR with an AND, solves the problem with the endless-loop, but error checking will not work (the loop only stops if no error AND no start-tag is found)
    changing the loop termination condition and putting the NOT from the error condition to the no_starttag_flag do both. correctly stops the loop when error occurs OR no further elements found.
    i attached the new sub.vi for version 7.0 and 7.1, also but some colors in the logo, for your convinience
    catweazle
    Attachments:
    xmlFile_GetElements_(Array).vi ‏76 KB
    xmlFile_GetElements_(Array).vi ‏65 KB

  • Reading from XML File to Oracle

    hello,
    I am facing an issue.
    I have an xml file which i want to read into an Oracle dB.
    for ex
    <user>
    <user1 ident="1" />
    <user2 ident="2" />
    </user>
    I would want to pick those attributes and insert them into the dB. i have been hunting high and low, but not reached anywhere.
    The reason, i am using the xml file is, that the user enters values from 3 forms and those values are stored in the xml file. Now, i want to insert these values in the database.
    Any help/suggestion are welcomed and appreciated.
    Thank You
    Sean

    Hi,
    I have been able to read the xml file and convert them into textboxes. The problem, i am facing is, how to i relate each of those values which are generated in the form of textboxes into values required by the Stored Procedure.
    has anyone come across this problem or is there a better approach.
    please advice
    thank you all

  • Reading from XML file and updating the table ????

    Hi
    I have package which reads the hier.XML file and does Update inserts into the 5 tables
    i have table called MAIN_tbl with the column cur_date.
    The package kicks if this cur_date is one day less than the hier.XML file DT.
    Currently i m manually checking this date's to make sure the Main_tbl cur_date is n sync with
    hier.XML file DT.
    for example :- hier.xml file DT is "20091020" then main_table cur_date should be 10/19/2009
    in order to kicks of the pakage.
    what i m looking to do ??
    compare the hier.xml DT with the main_table cur_date,
    if cur_date is -1(Preivous day) of hier.xml DT then run hier_pkg(Package)
    if not then update main_table cur_date to -1(previous day) of the hier.xml DATE
    Then later write the above logic to update the main_table in a procedure, and
    then call the package from the procedure.
    below are the top few lines of the hier.XML file which is relevant to the one which we are trying to do
    <?xml version = '1.0'?>
    <HIER_POSTING num ="111" HIER_TYP="CD" DT="20091020" Global="Y">
    FYI : The hier.XML file is located in UNIX space.
    How do i accomplish this. any idea ????
    Thank you so much in advance. For giving a thought on this problem!!!

    Any thought on this guys ???
    Thanks!!

  • Trouble with multiline text box reading from xml file

    Hi,
    I have a text area, set to multiline.  For some reason, when my text imported from xml shows up in the box, it starts several lines down into the box.  So for example, my Text box is positioned with the top at the midpoint of my stage, but the text starts about 3/4 down the page, about half way down the text box.  Can someone please tell me why this is happening and what I can do to fix it?
    I noticed that when I put my cursor in the box and move it up and down, the rest of the text 'scrolls' into the frame, but otherwise it's cut off.  please help!
    Thanks,
    Stan

    Could you show your XML?

  • How to display data in combo box from xml file.

    Hi All,
            I have the data in xml file.
      <jukebox>
        <song>
            <title>When the Levee Breaks</title>
            <artist>Kansas Joe and Memphis Minnie</artist>
            <url>delhi601(www.songs.pk).mp3</url>
        </song>
        <song>
            <title>Better Leave that Stuff Alone</title>
            <artist>Will Shade</artist>
            <url>delhi601(www.songs.pk).mp3</url>
        </song>
        <song>
            <title>Walk Right In</title>
            <artist>Cannon's Jug Stompers</artist>
            <url>delhi601(www.songs.pk).mp3</url>
        </song>
    </jukebox>
    and i want to display the only url in combo box list. for that how can load this xml file and how can i show.
    Can any one help me.
    thanks
    Raghu.

    Raghuvasa,
    Get the XML file data into an XML variable in your code, say var jukebox: xml. Then do
    combo.dataProvider = jukebox.song.url
    or as a shortcut
    combo.dataProvider = jukebox.descendants("url")
    The latter will pull out elements with tag name url at any depth in the xml structure, so sometimes you have to be careful, but in your case there should be no problem.
    Richard

  • Proxy service reading from XML file..

    Hey all - i am a newbie here.
    my project need is to access a xml file, retrieve its content by a proxy service and send its contents to client back.
    Do i need to use java callout / MFL transformation? If yes, how?
    I do not wish to make use of any corresponding business service for this purpose. Is above possible without using a business service? If yes then how?
    Please help me out..!!
    Thanks and Regards,
    Swapnil K.

    Hi Swapnil K.
    do the following
    1. Create an XML file registered as an XQuery resource like below:
    <mapping>
    <row>
    <key>key1</key>
    <value>value1</value>
    </row>
    <row>
    <key>key2</key>
    <value>value2</value>
    </row>
    </mapping>
    2. create a simple soap proxy based on your wsdl I assume it would have only one operation with in parameter keyParam and one return paramter rerturnValue
    3. add a pipeline pair and create an assing action to the variable rerturnValue assigning the follwing value
    $mapping/row[key/text()=$keyParam]/value/text()
    where $mapping is your eternal xml resource and $keyParam is the input parameter of your wsdl method.
    by doing so you can modify your xml mapping without touching your proxy.
    4. in the response pipe of your pipeline pair populate the $body with the appropriate wsdl reponse message containing the value of the rerturnValue varaible
    regards,
    Tony

  • Error when loading data from xml file

    Hi,
    I'm trying to load data into a table from XML file using ApEx DATA UNLOAD/LOAD interfaces .
    ApEx version is 3.0.1 .
    I'm getting this error:
    ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00222: error received from SAX callback function
    How to find cause of the error ?
    Janus

    Tkank you for the simple but good advice :)
    unfortunately even google didn't find many answers :
    LPX-00222 + APEX ... NOTHING
    LPX-00222 + ORA- ... 2 pages of something like
    "Examine the additional error messages and take corrective action"

  • Read data from xml files and  populate internal table

    Hi.
    How to read data from xml files into internal tables?
    Can u tell me the classes and methods to read xml data..
    Can u  explain it with a sample program...

    <pre>DATA itab_accontextdir TYPE TABLE OF ACCONTEXTDIR.
    DATA struct_accontextdir LIKE LINE OF itab_accontextdir.
    DATA l_o_error TYPE REF TO cx_root.
    DATA: filename type string ,
                 xmldata type xstring .
    DATA: mr      TYPE REF TO if_mr_api.
    mr = cl_mime_repository_api=>get_api( ).
    mr->get( EXPORTING  i_url     = 'SAP/PUBLIC/BC/xml_files_accontext/xml_accontextdir.xml'
                  IMPORTING  e_content = xmldata ).
    WRITE xmldata.
    TRY.
    CALL TRANSFORMATION id
          SOURCE XML xmldata
          RESULT shiva = itab_accontextdir.
      CATCH cx_root INTO l_o_error.
    ENDTRY.
    LOOP AT itab_accontextdir INTO struct_accontextdir.
        WRITE: / struct_accontextdir-context_id,
               struct_accontextdir-context_name,
               struct_accontextdir-context_type.
        NEW-LINE.
        ENDLOOP.</pre>
    <br/>
    Description:   
    In the above code snippet I am storing the data in an xml file(you know xml is used to store and transport data ) called 'xml_accontextdir.xml' that is uploaded into the MIME repository at path 'SAP/PUBLIC/BC/xml_files_accontext/xml_accontextdir.xml'.
    The below API is used to read a file in MIME repo and convert it into a string that is stored in ' xmldata'. (This is just a raw data that is got by appending the each line of  xml file).
    mr = cl_mime_repository_api=>get_api( ).
    mr->get( EXPORTING  i_url     = 'SAP/PUBLIC/BC/xml_files_accontext/xml_accontextdir.xml'
                  IMPORTING  e_content = xmldata ).
        Once the 'xmldata' string is available we use the tranformation to parse the xml string that we have got from the above API and convert it into the internal table.
    <pre>TRY.
    CALL TRANSFORMATION id
          SOURCE XML xmldata
          RESULT shiva = itab_accontextdir.
      CATCH cx_root INTO l_o_error.
    ENDTRY.</pre>
    Here the trasnsformation 'id ' is used to conververt the source xml 'xmldata' to resulting internal table itab_accontextdir, that have same structure as our xml file 'xml_accontextdir.xml'.  In the RESULT root of the xml file has to be specified. (In my the root is 'shiva'). 
    Things to be taken care:
    One of the major problem that occurs when reading the xml file is 'format not compatible with the internal table' that you are reading into internal table.  Iin order to get rid of this issue use one more tranformation to convert the data from the internal table into the xml file.    
    <pre>TRY.
          CALL TRANSFORMATION id
            SOURCE shiv = t_internal_tab
            RESULT XML xml.
        CATCH cx_root INTO l_o_error.
      ENDTRY.
      WRITE xml.
      NEW-LINE.</pre>
    <br/>
    This is the same transformation that we used above but the differnce is that the SOURCE and RESULT parameters are changed the source is now the internal table and result is *xml *string. Use xml browser that is available with the ABAP workbench to read the xml string displayed with proper indentation. In this way we get the format of xml file to be used that is compatable with the given internal table. 
    Thank you, Hope this will help you!!!
    Edited by: Shiva Prasad L on Jun 15, 2009 7:30 AM
    Edited by: Shiva Prasad L on Jun 15, 2009 11:56 AM
    Edited by: Shiva Prasad L on Jun 15, 2009 12:06 PM

  • Reading data From XML file and setting into ViewObject to Pouplate ADF UI

    Hi,
    I have following requirement.
    I would like to read data from XML file and populate the data in ViewObject so that the data can be displayed in the ADF UI.
    Also when user modifies the data in the ADF UI, it should be modified back into to ViewObject.
    Here is an example - XML file contains Book Title and Author. I would like to read Book Title and Author from XML file and set it into ViewObject Attribute and then display Book title and Author in ADF UI page. Also when user modifies Book title and Author, I would like to store it back in View Object.
    Please help me with this requirement and let me know if any solution exist in ADF, for populating the ADF UI screen fields with external XML file data.
    Thanks

    Read chapter 42 http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/bcadvvo.htm of the fusion developer guide
    Section 42.7, "Reading and Writing XML"
    Section 42.8, "Using Programmatic View Objects for Alternative Data Sources"
    Timo

  • Reads data from xml file

    i need a procedure that reads data from xml file and stores into an oracle table.

    Hi,
    Check the below links:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:27523665852829
    http://www.experts-exchange.com/Database/Oracle/Q_20932242.html
    Best regards,
    Rafi.
    http://rafioracledba.blogspot.com

  • How to ignore a node while reading data from XML file

    Hi All,
    I have a XML file that i am reading that XML file using XMLStreamReader and then i need to create another XML file that has specific nodes(from the database).
    I need to ignore nodes(with values) that are not in the database and while creating the XML file, only nodes that are it the database should be written in the new file.*
    For eg.
    <XML>
    <Stud>
    <Name>XYZ</Name>
    <Roll>1</Roll>
    <Class>1</Class>
    </Stud>
    <Stud>
    <Name>ABC</Name>
    <Roll>2</Roll>
    <Class>1</Class>
    </Stud>
    </XML>
    In database i have only two node :<Name> and <Roll>.
    So, my new XML will be
    <XML>
    <Stud>
    <Name>XYZ</Name>
    <Roll>1</Roll>
    </Stud>
    <Stud>
    <Name>ABC</Name>
    <Roll>2</Roll>
    </Stud>
    </XML>

    Hi gborges,
    Since you're new to LabVIEW, I thought I would post a few helpful links.  A great way to learn some LabVIEW basics is to look over the introductions --
    Three Hour LabVIEW Introduction Course
    Six Hour LabVIEW Introduction Course
    You might even want to think about signing up for the LabVIEW Basics I & II courses which are taught by Applications Engineers.  You can always search for KnowledgeBases and, of course, you already know about our forums!
    Happy coding,
    Megan B.
    National Instruments

  • Read data from XML file to LabVIEW

    I am writing LabVIEW front panel objects data to an XML file using LabVIEW 6.1 VI. Now, I want to read that XML file in another VI objects. How can I do this?
    Attachments:
    test.xml ‏1 KB
    Write_to_XML.vi ‏1 KB

    LV version 6.1 has tools for both reading and writing XML files. Check the examples, you should find your answer there.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Maybe you are looking for

  • Help me install windows 7 on my imac!

    HI! basically. Im trying to get windows 7 on my mac but every time i load in on to boot camp and it re boots itself to go and start installing windows. it goes to a black screen which says "no bootable device. Insert disk and press any key" to which

  • Download total BSP

    how to download the BSP page? i would like to download total BSP page contents.

  • Can I buy a replacement battery for my 13 inch Macbook Pro from Apple?

    The battery for my Early 2011 13-inch Macbook Pro is now completely dead, no longer even recognized by my computer.  Anyone know if I take it into the apple store if they can replace it for me?  I didn't see a battery in the Apple Store that would wo

  • CISCO IVR integration with Phoenix

    I have phoenix application which is based on ISO 8583. I have to integrate Contact-Center IVR solution with it. I wanted to know, if such an itnegration was ever developed earlier and is it provided by CISCO or by 3rd party? You can get more informat

  • IPod nano 3rd Gen & i-Station3

    I have an i-Station3 from Logic3. It always worked with my iPod nano 2nd gen, but it don't accept de new generation while they both have the same docking station. Is there a solution for this? Maybe a software update for the iPod or something? Thanks