Cluster and Read Write XML

In my applications I allow users to save their settings. I used to do this in a Ini file. So I wrote a Vi that could write any cluster and it worked ok. When I discovered that in the newer versions of LabVIEW you could Read/Write From/To xml, I changed inmediatly because it have some advantages form me but I am having some trouble.
Every time I want to save a cluster I have to use
Flatten To XML -> Escape XML -> Write XML
and to load
Load From XML -> Unescape XML -> Unflatten from XML.
I also do other important things each time I save or load settings. So it seems to be reasonable to put all this in just two subvi's. (One for loading, One for saving). The problem is that I want to use it with any cluster
What I want with can be summarized as following:
- SaveSettings.vi
--Inputs:
---Filename
---AnyCluster
---Error In
--Outputs
---Error Out
-LoadSettings.vi
Inputs:
---Filename
---AnyCluster
---Error In
Outputs
---DataFromXML
---Error Out
I have tried using variants or references and I was not able to make generic sub vi (sub vi that don't know what is in the cluster). I don't want to use a polymorphic vi because it will demand making one load/save pair per each type of settings.
Thanks,
Hernan

If I am correct you still you need to wire the data type to the Variant To Data. How can you put in a subvi ALL that is needed to handle the read/write of the cluster? I don't want to put any Flatten To XML or Unflatten From XML outside.
The solution I came out with INI files was passing a reference to a cluster control but it is real unconfortable because I have to itereate through all items.
When a control has a "Anything" input, is there any way to wire that input to a control and remains "Anything"?
Thanks
Hernan

Similar Messages

  • WCF Service and Sharepoint Form library : How i can read a access a form libray and query a item from file name and read form xml in WCF service ?

    WCF Service and Sharepoint Form library : How i can read or access a form libray and query a item from file name and read form xml in WCF service ?
    Ahsan Ranjha

    Hi,
    In SharePoint 2013, we can take use of REST API or Client Object Model to access the SharePoint objects like Form Library.
    SharePoint 2013 REST API
    http://msdn.microsoft.com/en-us/library/office/dn450841(v=office.15).aspx
    http://blogs.technet.com/b/fromthefield/archive/2013/09/05/working-with-sharepoint-list-data-odata-rest-and-javascript.aspx
    SharePoint 2013 Client Object Model
    http://msdn.microsoft.com/en-us/library/office/fp179912(v=office.15).aspx
    http://msdn.microsoft.com/en-us/library/office/jj193041(v=office.15).aspx
    With the retrieved file, we can then use XmlDocument object to parse it and get the values you want:
    http://weblogs.asp.net/jimjackson/opening-and-reading-an-xml-file-in-a-document-library
    http://stackoverflow.com/questions/1968809/programatically-edit-infopath-form-fields
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to login to a remote (FTP??) server and read an XML file?

    Hello all,
    I would like some information on how to login to a remote server using a Java program.
    The server might be a ftp server, because the client will ftp a xml file to this server, and the java program needs to login to this server and read the xml file, then convert it into a general report with headings and data from the xml file.
    How can I quickly find the API information to login to a server and read an xml file?
    If anyone knows the packages off the top of their heads, that would save me some time surfing.
    If anyone can provide me some links, code examples, or information I'd greatly be thankful.
    sharla

    You can also just use plain java.net. It supports FTP. Example:URL u = new URL("ftp://user:passwd@server/path/to/file.xml");
    InputStream in = u.openStream();
    // do what you want ...

  • Data source for deposit advice xml and check writer xml

    Could someone please tell me where I can find the data source for the Deposit Advice XML and Check Writer XML programs. Since these executables are now a spawned process (PYUGEN), I don't know how to get to the data source. I was able before to look at the queries in PAYUSPST.rdf and PAYUSCHK.rdf. Where are these queries located now? Any help is appreaciated.

    Hi All,
    I applyied the patch 6399100 and i got the seeded Check Writer (XML) and Deposit Advice (XML) programs.Im able to run the Check Writer (XML) with Parameter (Check Style :Seeded Archive Check Writer Template ) but where as the im unable to run the Deposit Advice (XML) due to Error msg: "No enties found for list of vales"for the 'Check Style' Parameter.
    And for the above (only for Deposit Advice) i am not able to ecexute the SQL script given in the Doc ID : 459306.1 due to the error msg : cannot insert NULL into ("HR"."PAY_REPORT_CATEGORIES"."REPORT_GROUP_ID") if i see query the select * from apps.pay_report_categories where short_name like 'ARCHIVE%' there is no record exixts for ARCHIVE_DEPOSIT....
    for this we required any other patch/setups.
    And is the "Third Pary Check" will support XML Publisher ??
    Any respose will be greatly appriciated.
    Thanks,
    Madhu
    Message was edited by:
    user589951

  • Search record combine with read only and read/write record

    can the search record display read only and read write only record together ?

    Maybe your Mac-B user account has the same (short) user name
    as your Mac-A user account. Matching user names or short user names
    could make the Mac-B account able to Read & Write to your shared folder.
    Because I think you can log in with short user names to a server
    as well. I guess passwords should be matching as well,
    and perhaps the user ID's (System Preferences -> Accounts
    -> right-click on user) also?
    Cheers,
    Vincent Verheyen.

  • Read/write xml data from/to adobe livecycle forms (pdf)

    Hello,
    I need some help reading xml data from pdfs created by Adobe LiveCycle and also writing xml data back to the form.
    The forms have been created using PROD LC 8.2 and in the future they will be created using PROD LC 9.5.
    I am using Visual Basic .NET to access the data programatically.
    Can anyone help me with some hints? A library, SDK? Any information would be very helpful.
    I am quite new with this Electronic Forms issue and I do not even know where to start.
    Thank you,
    Ionel

    Hi lonel,
    Do you want an online solution?
    I mean, it follows this workflow:
    1. The user will open the PDF by clicking a link, and a server-side program will generate the PDF and prepopulate it with data from some data sources, and render the PDF to the client (Browser),
    2. The user will fill the PDF.
    3. The user will click a Submit button and save the PDF and Data on the server.
    4. If the user wants to edit the Submitted Form, he will click a link to open the save PDF and possibly prepopulate some fields with data from other data sources, and complete the cycle of filling and saved the PDF and Data on the server.
    5. While the user is filling the PDF (inside a Browser), there might be a need to perform some lookup on the server, and update the form parts accordingly as a result of the lookup process.
    For 1-4 above, I have developed a complete base library using ASP.NET which helps you to perform the above.
    You can goto my Google Workspace and you will find a bunch of documents, sample PDFs, collections and VB Classes. To best view them, login using some Google Account.
    For point 4 above, one way to perform this effect, is to regenerate the required XML Data (which has the saved data before and the new lookup data), remerge the entire XML result with and empty PDF Form, and render the XFA (PDF Form) back to the client. But, if the PDF has one or more signatures, it will not work. So, in this case, you can update the Form Fields of a Saved PDF Form with new Data from the server, but the net effect is that you will have to loose all the signatures that were added on the PDF before.
    For 5 (above) there are 3 methods:
    1. Using a Web Service as a Data Connection. This is very easy if you have a traditional Web Service. I have used this method several times and will use it again if the need be. But, there is a problem. If the result of the Web Service is an Array of some Data, and you want to remerge the XFA to get the required effect after executing the web service ... and ... if there are some Drop-Down-List (DDL) fields, the bindings of the DDL Items of those fields will be lost. But, you can rebuild them (on enter event of the DDL Field)  if you have saved them in the embedded XML Data.
    2. You can update few (not many) fields while the PDF is opened (under the Browser via IFRAME) by passing the new field values using the URL Query String method. I have not done this, but I like this method, and I think it is cool. You need to write a server side code to ensure the the new filed values are passed back to the client using the correct URL with the Query String, and you need to write some javascript code inside the PDF to parse the URL and get the new field values and update them accordingly. See this as an example:
    http://www.halnesbitt.com/pages/pdfqs.php
    3. This method is very advanced and uses message communication ques between the Browser and the PDF (which is opened inside IFRAME element) using HostContainer object. This method will enable 2-way communication between the Browser and the PDF on the client side using javascript. I'd love to use this method one day. See example here:
    http://www.windjack.com/WindJack/Browser2PDF/brwsr2acroJS.htm
    I hope this will be of help to you.
    Tarek.

  • Read/write XML via OO4O

    We have some ASP code (Active Server Pages) that uses OO4O to select/insert data in an Oracle 8i rel. 2 database (The OO4O objects are from the same release 8.1.6). Now we would like to enhance it to read and store some XML documents directly (the XML documents are about 10 KB and have nested master/detail like structure).
    Our first idea was to write a stored procedure with a string argument to save the XML document, and to write a stored function also returning a string to retrieve the same data. But it appears that there is a 4KB limitation here (we thought it was a 32 KB limitation, but have only been able to get 4 KB?).
    Then we tried to use the RAW parameter type (although the documentation recommends not to), but this apparently requires the data top be transformed to binary format (the XML is in ISO8859-1 format).
    Have you any suggestions on how to overcome these limitations?
    Or are we simply going in the wrong direction (Is there a better way to use XML via OO4O than with stored procedures)?
    Regards
    Tom Bjerre.
    NB: The stored procedures written in Java look like:
    public static String get_xml(String key) throws SQLException{...}
    public static void set_xml(String key, String xmlStr) throws SQLException{...}
    with call specs of:
    CREATE OR REPLACE PACKAGE TEST AUTHID DEFINER AS
    FUNCTION GET_XML ("key" IN VARCHAR2)
    RETURN VARCHAR2
    AS LANGUAGE JAVA
    NAME 'Test.UtilXML.get_xml(java.lang.String) return java.lang.String';
    PROCEDURE SET_XML ("key" IN VARCHAR2, "xmlStr" IN VARCHAR2)
    AS LANGUAGE JAVA
    NAME 'Test.UtilXML.set_xml(java.lang.String, java.lang.String)';
    END TEST;
    null

    CHAR is limited to 2k.
    VARCHAR2 is limited to 4k.
    You should be using CLOB if you're
    saving XML strings.

  • Java card and reader/writer prices

    hi...I would like to know how much is a java card and how much is a reader/writer? thanks.

    You should implement your own session handling mechanism since the only type of session that is supported by JavaCard is HTTP, in version JC v3 (Connected version).
    Actually, I'm not even sure an HTTP session would suit your requirements.
    The easiest way to implement a session flag in your proposed system would be via a timestamp (saved in the Java Card applet).
    What does the following line mean?
    DOEACC@VIVS wrote:
    www.omnikey.com is best place

  • File Adapter and reading all XML files from direcotry

    Problem occurs on PI 7.1
    I defined sender file adapter. File name mask is: "*.xml" to read all XML messages from directory.
    Quality of service is: Exactly One.
    Poll Interval: 30
    Retry interval: 30
    Processing mode: Archive with option "Add Timestamp".
    Processing sequence: by name.
    I though that with above configuration my File Adapter will be reading folder for all coming XML files. But  somehow it is reading XMLs only when I'm activating it in Integration Builder.
    Any idea what can cause such strange problem?

    Hi Tomasz,
    As per my understanding, you need to activate the file adapter for reading the XML files on your directory. Right?
    If that is the case, then the issue might be with the Cache.
    1. Clear the cache from the Integration Builder.
    2. Check in SXI_CACHE whether there are any issues. Click on Delta Cache refresh to find out if there are any cache related issues.
    Thanks,

  • How can i use different suffix for read-only and read-write?

    I have a directory server with 11.1.1.5,I have created the root dn:o=test.com.cn. This dn is replication enabled and it is the consumer.
    I want to create another suffix:ou=test1,o=test.com.cn and I wish to write some data from own.
    However,when I use dscc to create the suffix,I can not find any entry under the suffix.
    When I use the command:
    ldapsearch -b "ou=test1,o=test.com.cn" -s sub "objectclass=*"
    I get this:ldap_search:no such object
    I can not import any ldif to this suffix.
    I get the error:
    import test1: WARNING: Skipping entry "uid=jwalker, ou=People, ou=test1,o=test.com.cn" which has no parent, ending at line 280 of file "/opt/dsinst/test1.ldif"
    When I use dscc to change the suffix to rootdn,I get the same error too.
    How can i do now?
    Thank u very much.

    There are a few issues here, ie
    "uid=jwalker, ou=People, ou=test1,o=test.com.cn" has no parent.
    Did you create ou=People, ou=test1,o=test.com.cn before you tried to create above dn?
    Also, your suffix naming is very poor and will result in more problems later on especially since you want to create sub suffices.
    you should use the DC notation, ie dc=test,dc=com,dc=cn that way you can easily attach o=test1,dc=test,dc=com,dc=cn
    This way you would be able to keep your separate suffices inside separate database files and you will have less headaches when you try to replicate and do bulk re-initialisations.

  • Unusual read, write XML request.

    I have a program that builds a JTree based upon a template , and properties file passed to it.
    I need a program that will rip through an xml file such as this xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <Device>
      <Module name="Module 1">
               <status>
                    <device Name="Yellowfin Demo"
                                   Description="Beta Tag mapper"
                                   Location="Jim's 13 slot rack"
                                   Contact="Jim"
                                   Serial Number="" >                 
                    </device>
                     <network></network>
                     <chassis></chassis>
                     <chassis></chassis>
                </status>
                <projedit></projedit>
                <projmngt></projmngt>
                <admin>
                      <network></network>
                      <device></device>
                      <users></users>
                </admin>
                <logging></logging>
           </Module>          
    </Device>and create a properties file that has this information in it:
    Devices.Module 1.Status.Device.Name=Yellowfin Demo
    Devices.Module 1.Status.Device.Description=Beta Tag mapper
    Devices.Module 1.Status.Device.Location=Jim's 13 slot rack
    Devices.Module 1.Status.Device.Contact=Jim
    Devices.Module 1.Status.Device.Serial Number=
    Devices.Module 1.Status.Network.Ethernet 1.MAC Address=
    Devices.Module1.Status.Network.Ethernet 1.IP Adress=
    Devices.Module1.Status.Network.Ethernet 1.SubNet Mask=
    Devices.Module1.Status.Network.Ethernet 1.Default Gateway=
    Devices.Module1.Status.Network.Ethernet 2.MAC Address=
    Devices.Module1.Status.Network.Ethernet 2.IP Adress=
    Devices.Module1.Status.Network.Ethernet 2.SubNet Mask=
    Devices.Module1.Status.Network.Ethernet 2.Default Gateway=
    etc...This properties file is fead to the program and creates the JTree
    Is it possible?

    Yes, of course there's a way to do this whatever you have in mind actually. What makes your request unusual is that you have posted an ill-formed XML document and an output that is inconsistent with this document. An unambiguous description of how to construct the lines of the output file would also have been a great step forward to get a detailed answer.

  • Whats the power consumption in standby and read/write mode on the Hitachi HTS545032B9A302 ?

    Hello, im about to but an ssd and dont want to pick a drive with more energy consumption to reduce the battery time so i wonder if someone knows the conumption for the Hitachi HTS545032B9A302 drive on the new macbook pro or in worst case if someone dares to approximately guess the consumption in W(Watt)

    Does the hard drive label say 5V 700ma?
    You might look at the Hitachi spec sheet for the A300/A301's, which have the same power specs: http://www.hitachigst.com/tech/techlib.nsf/techdocs/FFA370A7BF845F87862574FE0003 054C/$file/TS5K500B_DS_final.pdf

  • Retrieve and Read XML Files using Oracle6i Forms

    Dear all .. i have some problem here: How can i retrieve and read a XML files using Oracle6i Forms? What should i do? Thanks - ASAP -

    Several ways - Pick up a copy of the Oracle XDK off of OTN. This provides Java and PL/SQL toolkits for dealing with XML files.
    The PL/SQL one would be in the Database, so you might have to use the Java one of you need to do it on the Forms machine.
    You can use the Java Importer in 6i to create PL/SQL wrappers that you can call from forms into the Java XDK APIs.
    Or of course you can just use the TEXT_IO package to read the XML as a text stream and parse it in your own PL/SQL code...

  • SharePoint read/write list item to another DB/file

    Hi All,
    I am working on MOSS 2007. I have the following requirement.
    There are around 50 document librararies on a site collection. I need to store all the items from these libraries in a locally (it could be DB/CSV or excel or access) and read/write them periodically for some calculations/comparisions.
    Note: 1) the VM that I am working doesnt have MS Office installed to try for Access or Excel.
             2) Is there a way to use access without needing to install MS Office.
    Please let me know the best approach for the above task.
    Any help is greatly appreciated.
    Regards.

    Hi All,
    Can any one help me with this..?
    Thanks.

  • Write XML in a context field

    Good morning forum
    Have to implement the following solution.
    In a Web Dynpro component I am consuming a web service, and reading an XML, it is now functioning properly.
    But after the XML data is loaded into context, I must record all xml content in a context field.
    I implemented the following logic:
    Request_ITF_O_S_CONSULTA_CADASTRO requestMO = wdContext.currentRequestWSElement () modelObject (.);
    requestMO.wdSetInvocationLogEnabled (true);
    String xml = requestMO.wdGetResponseLog ();
    However the variable "XML" is blank.
    Does anyone have any tips on how to do this?

    Hi Carlos,
    have you even executed the the operation of your WS Model? I can't see that from your code. And ofcourse you have to set the LogEnabled to true before you execute the operation.
    Here is some sample with explanations:
    Request_NumberToWords requestMO = wdContext.currentRequest_NumberToWordsElement().modelObject(); 
    if (logger.beDebug()) {
      requestMO.wdSetInvocationLogEnabled(true); //switch on logging for this model object
    try {
      requestMO.execute();
      wdContext.nodeResponse().invalidate(); //update context from model
      } catch(Exception ce) {
      wdComponentAPI.getMessageManager().reportException(ce.getMessage(), false);
    logger.debugT(requestMO.wdGetRequestLog()); //request log (HTTP header + SOAP request)
    logger.debugT(requestMO.wdGetResponseLog()); //response log (HTTP header + SOAP response)
    logger.debugT(requestMO.associatedModelClassInfo().getModelInfo().toString()); //model metadata in XML format
    logger.debugT(requestMO.toString()); //model object tree in XML format (= model context node content)
    Regards,
    Tobias

Maybe you are looking for

  • Mac webcan to pc msn

    hi, not sure if i am in the right topic i have a mac osx 10.3.9 i need to chat on webcam via msn to a friend overseas who will chat via webcam in a net cafe thru msn i think msn will be the only app in the net cafe will this work? me being on mac and

  • Display Link in New Region on Same Page

    Hi, I am trying to figure out how to make a page link within a region post to a different region on the same page or at least in a new window instead of the same window. Thanks In advance, Emily

  • Integrating with Middleware by ABAP Proxy.

    Hi Guys, i am created abap proxy in CRM 2007 by calling Wizard.Now after creation of proxy a class is generated with its method PROCESS.then did some coding in extract program for the requirement and used the method of the created class.         Now

  • Problem in Updation of OcrCode and CogsOcrCod

    Hi, My problem is as follows, I am creating AR Invoices using DI, in the invoices we have the Dimensions (OcrCode), we can configure 4 different dimensions and use all 4 in a single Invoice now the problem is that we cannot add more than one Dimensio

  • Will Photoshop CS1 work with Leopard (OS 10.5.X)?

    Due to budgets restraints, I cannot afford to update Adobe Photoshop. I have been using Photoshop CS1 on OS 10.4.11. If I update to OS 10.5.X, will I be able to use CS1? I cannot seem to find another source for an answer to this question so I am tryi