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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

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