Entity (with children)-> XML in SelfServing

Posts   
 
    
Kovan
User
Posts: 19
Joined: 26-Sep-2005
# Posted on: 24-Oct-2005 16:23:04   

sorry, had to start a new thread, i marked the other one as done when the problem is far from solved

i used the sample code provided in the help // [C#] StreamWriter writer = new StreamWriter("customer.XML"); string customerXml = String.Empty; customer.WriteXml(out customerXml); writer.Write(customerXml); writer.Close();

which is nice because it brought my xml file from 65k to 30k but i see ther eis still a LOT of unwanted data in the xml file

for example: <AlwaysFetchCommunity>False</AlwaysFetchCommunity> - <EntityCollectionReference PropertyName="CustomerStagings"> - <CustomerStagings> - <Entities> - <Entity CustomerID="86"> <AlwaysFetchCustomerPropertyValuesStaging>False</AlwaysFetchCustomerPropertyValuesStaging> - <Fields> - <CustomerID> <CurrentValue>86</CurrentValue> <DbValue /> <IsChanged>False</IsChanged> <IsNull>False</IsNull> </CustomerID>

the ONLY relevant data in there is the customer ID,

i guess i should rephrase my question, is there a way to get back a document exactly like the GetMultiAsDataTable that supports children as well.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 24-Oct-2005 17:39:40   

Have you tried the overload of WriteXml which accepts aspects for the xml serialization, like compactxml?

Some xml data is there for change tracking. So you can alter an entity on the client, serialize it to xml, send it to the server, re-instantiate it there and save it. Without having info for that serialized into the xml, it's impossible to know which fields are changed.

Frans Bouma | Lead developer LLBLGen Pro