Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

SimpleXMLEncoder and ArrayCollection Conversion

Avatar

Avatar
Level 1
khitlin
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
khitlin
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
khitlin
Level 1

26-09-2008

I am using the SimpleXMLEncoder class to covert objects to
XML. All is well except when dealing with typed Array Collections.



If I have an array of objects who themselves have their own
types, the XML that the encoder generates refers to them as items,
not the type of the object within the array. Here is an example.

Here is what I want….



<campuses>

<campuse_choice>

properties here……

</campuse_choice>

</campuses>



What i get is…..



<campuses>

<list>

<source>

<item>

properties here.....

</item>

</source>

</list>

</campuses>



I looked in the SimpleXMLEncoder class and I see the line
(152) that converts them to items. any way to have it pick up the
object types within the ArrayCollection?