Jump to content

start with xml data


qwerty3321

Recommended Posts

Do a match pattern on those: 

"<Name>Test 1</Name>

<NumElts>"

and then on "<NumElts>"

By getting the character position in the file, you can easily replace the value in between with anew one.

repeat with 

<Name>Test 2</Name>

 

But why do you want to replace those value? are they already real measurement from real device?

I have Ethical concern on what you are trying to do.

Benoit

Link to comment
2 hours ago, qwerty3321 said:

Where did you get this XML document from? It is corrupted (There are many stray "-" characters, so XML parsers will give you an error)

Also, take the time to follow @crossrulz's advice:

On 11/26/2018 at 6:46 PM, crossrulz said:

1. Help->Find Examples.  Do a search for XML

2. Go look at packages in VIPM.  NI has a Simple XML library that I used to figure some things out.  Then JKI and MGI have their own XML packages you can have a look at.

 

Edited by JKSH
Link to comment
15 hours ago, qwerty3321 said:

can you show me how to fetch the name and value of two elements of cluster test1 and test2 using xml palette please

Why do you refuse to use the code that @Benoit already wrote for you?

Like I said before, your XML file is corrupted. The XML palette won't work on it.

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.