zuzu Posted October 3, 2006 Report Posted October 3, 2006 Hello everyone I'm a beginner in Labview and i have a problem of the conversion XML-->string :headbang: In fact, i have a file XML that i consider as a table of strings, i have to get the information stocked in the last line of this file, just before </LVData>. The longer of the XML file isn't fixed. Could you help me with this problem? Thanks a lot :worship: Quote
thols Posted October 3, 2006 Report Posted October 3, 2006 Welcome to LAVA! I don't know much about xml, but I guess your file looks something like this: <?xml version='1.0' standalone='yes' ?> <LVData> <Version>8.2</Version> <Array> <Name></Name> <Dimsize>0</Dimsize> <String> <Name></Name> <Val></Val> </String> </Array> Is this the line you want? </LVData> So, to get your line of data, can't you just search for </LVData> and take the line before that. Example: Of course, this can as always be done more efficient, but this works. Quote
zuzu Posted October 3, 2006 Author Report Posted October 3, 2006 Thanks for your answer, thols I have a problem with your solution : the function "Research an expression" waits for a string but my file XML is a table of strings, so the types of data aren't compatible... However, i found another solution after lots of tests : File XML --> Function "length of a table" --> length -1 --> Function "To Index a table" with index 'length-1' for the last line, the output of "To Index a table" is the data that i have to save... Thanks again :thumbup: Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.