Jump to content
shruthibs

tags with different names but same contents

Recommended Posts

A bunch of xml files that I want to parse using easy xml, contain a tag <TestType>. This is not exactly the tag, in any xml file created it has to be replaced by one of these :

CompareFrontPanelValues

FpgaPassIndicator

HostPassIndicator

FpgaInterfacePassIndicator

CompileOnly

CodeGenerationError

So the tags will be (correspondingly) :

<CompareFrontPanelValues>

<FpgaPassIndicator>

<HostPassIndicator>

<FpgaInterfacePassIndicator>

<CompileOnly>

<CodeGenerationError>

Now the xml file has a tag <FpgaTestList> containing many <TestType> tags.

The tags that can be inside <TestType> are independant of the actual test type tag that is used.

How should the cluster that I create in labview be so that I can convert this xml file to a cluster?

An example of the xml file is attached below.

I have also attached a vi that I tried but I feel that is too clumsy plus it doesn't work (Name isn't getting filled for the first and second array)

myTest.xml

tryingjki.vi

Edited by shruthibs

Share this post


Link to post
Share on other sites

shruthibs,

 

Try the attached control for your XML file.

 

no no what i want to know if there is some way of avoiding having to create so many clusters where the only difference is the cluster name

i've given just one example but hostvi, fpgavi, parametersvi, resources and other tags may be in the other testtypes too .. the thing as i've mentioned before is that the tags that can be within the testtypes are same - this is a predefined format so i cant change it - otherwise i could have just made the actual testtype an attribute of the tag like this eg. <TestType type="CompareFrontPanelValues">. I tried getting the xml text content under each testtype and passing it to easy parse xml (i've attached it below) but that doesn't seem to work either and its a work around that i don't like

tryingjki.vi

Share this post


Link to post
Share on other sites

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.

Loading...

×
×
  • Create New...

Important Information

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