I posted this on the Nabble forum that is of simpleXML, but since it is a mailing list it may take some time, so I thought Id post here in the hopes someone would be able to answer sooner...
Here is the post:
So I have my overall collection called MeasurementProjects, which is a collection:
and then MeasurementProject has different variables I declare as @Elements:
So this creates the XML you'd expect:
But I am needing to add a device @ElementList within each <measurementProject>, the XML should come out like this:
SO I started by adding a new variable to the MeasurementProject Class, so now in addition to @Element projectId and @Element name I have added:
Then I created a ProjectDevice class with only one variable @Element deviceId. It looks like this:
There are of course setters and getters for everything.
So now I have a class to set all these variables, and then add the xml to a web service:
Now I would expect this to create the following:
But instead I get:
So as you can see the ID and name are being set, but not the devices list. Here are the three involved classes if you want to spend the time going through it all, but hopefully someone can tell what Im doing wrong just from the above. Here it is: