Jump to content

help Labview XML-->string


Recommended Posts

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:

Link to comment

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:

post-2740-1159875732.png?width=400

Of course, this can as always be done more efficient, but this works.

Link to comment

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:

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.