App Files Saved as XML and Working with New Versions

We work with app data in the form of array of large clusters and use LV Anything to XML conversion VIs to save to disk.
The problem is when new app versions are developed and changes are made to the cluster format; we want the customer to be able to open the old version saved XML file format.
Usually the saved cluster (in XML) has be changed by adding/removing a field or even changing the options of a ring control for example.
The app name and version is stored in the XML.
Question: Is there a way of easily working with XML file formats with slightly different fields?
In the past we have worked with the raw XML text by searching for fields which are different and modifying them accordingly so they are accepted by the new file format.
Any tips would be greatly appreciated.

battler. wrote:
I have written a software name and version cluster to XML.  How do you read the version field in the XML?  Do you use string search?  Is there a better way?
Yes, I use String Search (because it is near the beginning of the XML string).  Depending on your XML "flavor", you should be able to uniquely-identify the Version information.
I'm interested in how best to work with XML.  It seems cumbersome and prone to error to use string functions.  Is there a way or best practice of reading the XML fields directly without converting to cluster?
XML is, after all, text with specific "tag" information, also text, identifying it.  String functions are pretty much "the way to go", but except in rare circumstances, you shouldn't necessarily "roll your own", but should try to use the utilities that come with your XML package that "know" how to do the mapping between the XML representation of a LabVIEW variable (and its value) and the Variable itself.
Can you elaborate on these "mapping" and "reading/conversion" routines you're using?  How do they work and what functions do they use?
An excellent question.  There are at least three XML packages out there for LabVIEW -- the "native" LabVIEW package that NI provides, EasyXML from JKI Software (distributed using VIPM), and GXML, also on the LabVIEW Package network.  I'm afraid that I'm slightly "abusing" XML, and have made some modifications to how I use EasyXML and GXML. 
If you simply view an XML file in a "smart" editor, you'll see a series of text lines with Begin/End tags (like HTML).  Depending on the XML "flavor", embedded between the tags are data that describe the LabVIEW variable type (e.g. Dbl, Cluster, Array, etc.) and also the value(s) of the Variable.  The "ReadXML" (or similarly-named) function takes this description and (usually) returns a Variant that you can "turn into" the chosen variable (because you know the data type).  [You may need to tell the Reader, in advance, the type of LabVIEW variable to expect so that it "knows when to stop reading"].
As to how they work, they just do String pattern matching and processing, usually of a pretty sophisticated level, but then you don't have to do the hard work yourself!
Why do you use Private Project library?  Is your project based on OO?
The reason I used a Project Library with the "messy details" in the Private parts has nothing to do with OO, but rather with "data hiding".  I actually developed this for my data processing routines.  I had a set of routines that collected and analyzed the data (about 700 VIs).  Let's call this Project "Version 1".
For Version 2, I basically added a dozen variables to the main  Data Cluster (having over a hundred elements) that characterized the response.  As this Cluster was in a Type Def, I didn't have to change my code very much to accomodate this new data format, so most of my VIs kept the same name, but were "different" because the underlying TypeDefs were different.
So I have a Version 1 program that can analyze Version 1 data, and a Version 2 program for Version 2 data.  What I want is a Version-independent program that can look at the data, and then call for Version 1 or Version 2 analysis.  By burying the Version 1 and Version 2 code inside of a Project Library, and only exposing the top-level "Analyze My Data" VI, my Analysis routine, which didn't know (and didn't care) about the two different Data TypeDefs, just figures out (from the XML) which Version of data I have and then calls either Lib1:Analyze My Data or Lib2:Analyze My Data.  If I ever change the Version again, I just need to copy the code in the Library to a new Lib3 Library, modify the TypeDef and related version-specific code as needed, and I'm done.
I may have made this sound easy -- trust me, it was a definite learning experience.  While trying this out, the first thing I did was to "break" my installations of LabVIEW 2012, 2013, and 2014 (curiously, LabVIEW 2011 wasn't broken).  It stayed "broken" for about a week, then "cured" itself (I'd done something illegal, or maybe just immoral, with my Library, and it took a while to purge the badness).
BS

Similar Messages

  • I downloaded the latest firefox 4 and updated my file, firefox 4 will not work with my version of Mac OS X, how do I get my old firefox back?

    I downloaded the latest firefox 4 and updated my file, firefox 4 will not work with my version of Mac OS X, how do I get my old firefox back?

    You can get Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html

  • Do older instruments such as Agilent 8241 Signal Generators work with newer versions of VISA such as 5.1.2?

    I need to upgrade some Windows NT-based test equipment to XP.  Do older instruments such as Agilent 8241 Signal Generators work with newer versions of VISA such as 5.1.2?

    Yes

  • Xml code not working with new version

    Hi,
    my following code is not working with the xalan 2.7.0 version. Any one can help to convert this to work on new version.
    import java.io.*;
    import java.util.*;
    import org.xml.sax.*;
    import org.apache.xalan.xslt.*;
    public class XML2Edifact
    public static void main(String args[])
    throws SAXException, IOException
    if(args.length < 3)
    throw new IllegalArgumentException(
    "Usage is XML2Edifact in.xml xsl.xsl out.edi");
    InputStream sin = new FileInputStream(args[0]),
    sxsl = new FileInputStream(args[1]);
    OutputStream sout = new FileOutputStream(args[2]);
    EdifactFormatter formatter = new EdifactFormatter(sout);
    XSLTProcessor processor =
    XSLTProcessorFactory.getProcessor();
    XSLTInputSource in = new XSLTInputSource(sin),
    xsl = new XSLTInputSource(sxsl);
    XSLTResultTarget out = new XSLTResultTarget(formatter);
    processor.process(in,xsl,out);
    }

    Solved, had to repair the Z10 with the PC!  Would have thought that upgrading software would have saved the environment so that this step was not needed (played with this for several weeks on-and-off).

  • InDesign CS2 - 100 document limit and compatibility with newer versions

    Hello,
    I have Adobe InDesign CS2 and am using it to compile a large report. I have come across a problem once i tried to add more than 100 documents to my book and now see there is a 100 file limit to books in CS2. Each document needs to stay as a single file so i am unable to join files to overcome this problem.
    I have a summary table at the beginning of the document detailing the title of each file in the book. I am unable to work out how to create page hyperlinks in the pdf to the second book (documents over the 100 mark).
    It has since come to fruition that my company has updates to CS3 and CS5 and that these new versions do not have a 100 file limit in creating books. This document i am creating is over 400 pages long so i am wary of upgrading to a new version when i am not far from publishing.
    Should i have any concerns in upgrading to a new version of InDesign when i have almost finished my report? Would it be better to just upgrade to CS3 and not make such a large jump to CS5? Or does anyone know how to create page hyperlinks in my pdf to the files contained in the second book?
    Thanks for any help! Much appreciated.

    Normally I would advise against changing versions in midstream on a project like this, but I'm not sure you have a choice. My instinct is there will be fewer issues moving to CS3 than CS5, but there are far more features in CS5 you might like to use...
    One way to limit the possible anomalies would be to export all the CS2 files to .inx na open those in CS5, rather than converting the .indd files directly, then save as new CS5 .indd files and add to a new book. One very serious issue you may run into wehn moving to a later version is that the text engines are updated and text won't necessarily flow exactly the same, particualry justified text, which can cause line endings to move and some paragraphs may gain or lose a line, which can have a really devastating effect on a long doc if it causes a page count to shift. The killer is that the changes normally don't happen until you start to edit text in that story. I believe the .inx route will force a recompose on opening, but I'm not dead certain, so take a look at http://indesignsecrets.com/force-text-reflow-when-indesign-forgets-to-flow-the-text.php to see how to force the recompose manually as soon as you open the file (you'd only need to do it once, before saving in the new version, for each file), then check carefully for oversets or other problems. Live preflight in CS5 can help with that.
    As you can tell, a successful move to a newer version is likely to be a lot of careful work preparing and checking the files. Some of it can be automated (the export to .inx, the recompose, and the save in the new version) by scripting, but in all honesty you're going to need to check every page when you are done.
    One of the others who uses Hyperlinks will need to weigh in on ID's native abilities and linking to other files in a book. I know that doing that with cross-references (which don't even exist natively prior to CS4) is extremely likely to break down at some point and leave you trying to remake them all, and large numbers of links across docs is likely to slow CS5 in particular to a crawl unless all files (at least the ones to which there are links in the doc you are editing) in the book are open.

  • PrintToGo not working with new version of OS 10

    Am unable to load files using PrintToGo since new version (10.1.0.4181) installed.
    Worked fine with previous version and works with Playbook (2.1.0.1526)
    PrintToGo log error:
    PrintToGoDesktop.exe Information: 0 : 02/09/2013 11:33:52 AM - TCPClient.BeginConnect() using ServerIP:192.168.2.102, ServerPort:80
    PrintToGoDesktop.exe Information: 0 : 02/09/2013 11:33:52 AM - TCPClient.EndConnect()
    PrintToGoDesktop.exe Information: 0 : 02/09/2013 11:33:52 AM - Connected Successfully!
    PrintToGoDesktop.exe Error: 0 : 02/09/2013 11:33:52 AM - Cell Phone Z10 (2ABE5757): EXCEPTION THROWN - System.NullReferenceException: Object reference not set to an instance of an object.
       at RIM.PrintToGo.UserInterface.Device.UploadPDFFile(String fileTransferURL, String fileName, BackgroundWorker bw, DoWorkEventArgs e)
    PrintToGoDesktop.exe Information: 0 : Removing temporary PostScript file 'C:\Users\Paul\AppData\Local\Temp\PtB1360.tmp'
    Solved!
    Go to Solution.

    Solved, had to repair the Z10 with the PC!  Would have thought that upgrading software would have saved the environment so that this step was not needed (played with this for several weeks on-and-off).

  • Upgrading of exisiting photo library to work with new version of iPhoto

    I installed iLife'06 over my exisiting 05 version.
    When opening iPhoto the system notifies that the photo library needs to be upgrades to work with this verion of iLife.
    When clicking the upgrade button it examines the photo library and comes back with an error message sayin: "There is a problem accessing one or more folders in you iPhoto library folder. In Finder select iPhoto library folder. Then choose File >get Info. Make sure you have read and write permission for the folder and then apply this setting to all enclosed itmes."
    I then follow all the instructions as above and continue to get the same error message.
    Who can help me to view my photos again?
    Dieter

    Yep, Thomas Reed's article is a real gem.
    Antoine,
    You'll need to uninstall the VB, not just trash it.
    This is from their website:
    If you ever want to uninstall any Intego software, launch the Intego Installer, as explained above. Click the Uninstall Software button, then select the software you wish to uninstall, and click Uninstall. The software will be removed.

  • My web pplication does not working with new version of firefox 31. It uses heatmap.js plugin for leaflet.js to build temperature map.

    There is site for heatmap.js: http://www.patrick-wied.at/static/heatmapjs/example-heatmap-leaflet.html
    It has example for leaflet layer.
    After update firefox to version 31 I could not see temperature map in browser for this example. But with previous version of firefox I could see it.
    My web application users leaflet.js and heatmap.js plugin. It users the same code as on the example page.
    After updating firefox version it saying "your script take too long time to run. Continue?" again and again and temperature map does not appear.
    I use leaflet-0.7.2.js and heatmap-1.0.js plugin for leaflet.

    Seems to be working here.
    You can try these steps in case of issues with web pages:
    You can reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Hold down the Shift key and left-click the Reload button
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (Mac)
    Clear the cache and cookies only from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > "Use custom settings for history" > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • 1st Gen iPod Mini won't work with new version iTrip

    Hello all,
    I cannot get my new iTrip (which connects to the bottom of the iPod) to work with my girlfriends iPod mini 1st generation. The new iTrip works fine on my video iPod but not on her mini.
    We had the original iTrip and that worked fine but nothing is happening at all when the music is playing and the iTrip is connected. Anything i need to do or install to get this working? I have tried to search the discussions but failed to find a similar problem.
    Any help or info will be much appreciated.
    Many thanks.

    Ah, i seemed to have fixed it! Well i've been trying for a few weeks now to sort this out and as soon as i put up a post it works. Oh well at least its working now. It seems like that the iPod needs to be playing BEFORE the iTrip is plugged in the turn it on.
    I'll get me coat...

  • Panasonic network cameras no longer work with new versions of Firefox.

    I have been viewing my Panasonic Network camera, model BB-HCM381A using Firefox for several years.
    Starting with Firefox version 15.0.1 and again with 16.0.1, 16.0.2 and 17.0.1 the browser begins to display the streaming video, but then drops the signal after maybe 20 seconds. Refreshing the page brings back the image for another 20 seconds, and then drops it again.
    All previous versions of Firefox before version 15.0.1 worked great. Now I have to use Internet Explorer exclusively. It would be great if you could fix the problem.
    Example of viewing the streaming video can be found at www.bandon.tv, which may require installing a plug-in from Panasonic.

    I see the same happen, but it takes longer. It is possible that the server gets too many visitors and drops some of them. A right click and "This Frame > Reload This Frame" also works. I also notice that frames get blocked (it skips seconds), so you may need a faster server.
    <!-- http://hithere.viewnetcam.com:50000/ImageViewer?Mode=Motion&Resolution=640x480&Quality=Clarity&Title=0 -->
    <!-- data:text/html;charset=utf-8,<input xmlns="http://www.w3.org/1999/xhtml" width="640" type="image" height="480" border="0" src="http://hithere.viewnetcam.com:50000/nphMotionJpeg?Resolution=640x480&amp;Quality=Clarity" name="NewPosition" /> -->

  • Will an original iSight camera (peripheral) work with newer versions of Mac OS X (Snow Leopard, Lion, Mountain Lion)?

    Hi there,
    I'm thinking about purchasin a used iSight camera so I can skype using my TV (which I now use as a monitor). Will this older legacy product work with my MacBook Pro (2011)?
    Thanks,
    Alex

    It can work, but I'd recommend a new compatible USB cam instead.
    More info here: http://discussions.apple.com/thread/3983993

  • Why o why does my cimputer say uopdayte now to latest Firefox Version and then say add ons like SKYPE etc will not work with new version . I di not understand .o

    as above

    Many add-ons work only with a particular range of Firefox versions. After the upgrade, Firefox will attempt to find new compatible versions. This is not always possible.
    To determine whether an add-on you can't live without has a version for Firefox 11, you can check the [https://addons.mozilla.org/en-US/firefox/ Add-ons site] or try this add-on to make that a little easier (I haven't tried it myself): [https://addons.mozilla.org/en-US/firefox/addon/is-it-compatible/ Is It Compatible? :: Add-ons for Firefox].
    By the way, many recent posts report problems with Skype add-ons, so you might want to research here if you notice any strange copy/paste problems.

  • Cam no longer works with new version

    i have installed the latest version of flashplayer but now my webcam no longer works on video chat sites like chatoulette what should i do please?

    This is a known issue with Flash Player 11.2.  Please install our 11.3 beta 3 release and let us know if it helps.

  • Can no longer copy and paste with new version. Articles you provided did not help.

    When I try to copy and paste in firefox it says I can't do it any longer. It's a security issue, and the "learn more" tab gives some abstruse directions about completely closing firefox, and then getting back in without opening it to a place I can't find.
    Could you please tell me how to re-enable these necessary functions in an understandable way?

    Is this only on one website? some websites disable copy and pasting for various reasons.
    If this happens on every website, have you tried to start Firefox up in [[Safe Mode|Safe Mode]]? It may be an extension causing the problem.
    Also, go ahead and update to Firefox 11, since it does have several bug fixes (I don't recall anything related to copy and paste, but give it a go [http://www.getfirefox.com www.getfirefox.com] )
    Or, you may have some sort of virus which is interfering with your copy and paste. Download and Install MalwareBytes Anti-Malware, run a full Scan. [http://www.malwarebytes.org/ http://www.malwarebytes.org/]
    Download and Run TDSSKiller [http://support.kaspersky.com/faq/?qid=208283363 http://support.kaspersky.com/faq/?qid=208283363]
    Let me know if you are still having problems after these steps!

  • Photoshop CS6 not working with new version of Yosemite. Please help!

    When I was running Mavericks on my Macbook pro 15" Intel i7,everything seemed to be working completely fine. Now when I try to run Photoshop CS6 on Yosemite, the program keeps on crashing and giving me an error. Please help!

    Sometimes the Yosemite upgrade breaks the install. You may have to uninstall and reinstall CS6, and do so as an administrator.
    Gene

Maybe you are looking for

  • Firefox 3.6 just installed but won't open

    SUBJECT: FIREFOX WON'T OPEN. I have used Firefox for years, but upon reinstalling my Vista Home Premium OS, I also had to reinstall all my software. The only problem I had was with Firefox, which appeared to download and install successfully, but ref

  • Generation of Billing Document with odd number range.

    Hello SAP folks, There is specific issue related to billing document which are generated on Production server. There are billing document which are created on a date lets say 06.01.2009 and number ranges are assigned to it. But when another Billing d

  • HP2600n suddenly stopped printing in Windows 7 system 64-bit--wh​y? No error mes, no system changes

    After two months, HP2600n suddenly stopped printing in Windows 7 system 64-bit--why?  No error mes, no system changes. I tried reinstalling the drivers, changing USB ports and cables, printing from Notepad, and disconnecting the  printer. My computer

  • Automatic space adjustment when template populated with data programmatically

    I have a situation for which I need to find a solution and need the help of adobe gurus who frequent this site and provide their help. I have created a pdf template using adobe designer 7.0. Later using a VB program which gets values from a database

  • PE9, Problems with balancing Audio

    I am attempting to create a DVD project with a Menu front page. with the option to view the whole movie, or three individual scenes. I can use the pre-existing main and scene menues. But whether utilising the sound track that comes with the provided