AnsweredAssumed Answered

Creating a database programtically

Question asked by StuartHemming on Nov 25, 2016
Latest reply on Nov 25, 2016 by gregor

I have a bunch of Templates exported as XML. Some represent items that will have data collected against them, some represent items to be used in a hierarchy.

 

So, lets say my templates folder contains

A.xml, B.xml, C.xml and a number of data point elements X.xml, Y.xml and Z.xml.

 

I want to put code together that will allow someone to say this is my structure, go create it, and pass in a description that represents this...

 

A

|-B

  |-X

|-C

|-Y

   |-Z

 

Now if that was all it was I know I could create the hierarchy, export it and just reimport it on demand. But. I want the user to be able to describe the shape of the hierearchy at run time, so the could have just as easily asked for...

A

|-B

|-C

   |-Z

 

The problem is that I can't seem to work out how to import a template in to a particular point in my existing hierarchy. PISystem.ImportXML() doesn't seem to know how to do this.

 

Is it possible?

Outcomes