Click here to Skip to main content
15,178,422 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hey guys, I need your help, I am confused by the way XMLSerializer is being used in java " XMLSerializer(System.out,null)".
private void printXML(Element lobjElement) {
/* This function is used for debugging purposes. Its a utility function */
      String lstrRRXString;
      XMLSerializer lobjSer1 = new XMLSerializer(System.out,null);
  } catch(Exception e) {
      System.out.println("Error in printXML of RecordObject "  + e.getMessage());


And I have been through the XmlSerilizer documentation in c# and I only found ones that serialized objects. e.g

XmlSerializer serializer =    new XmlSerializer(typeof(OrderedItem));

Is there a way to mirror that in c#?.

thanks a lot for your help.
Updated 20-Sep-13 7:19am
Sergey Alexandrovich Kryukov 20-Sep-13 16:36pm
Why Java if the question is about .NET?

1 solution

You need to create a writer[^] and then serialize each element to it in turn.
rudolph098 20-Sep-13 13:51pm
Please can you give me a more concrete example, the documentation didn't.
Richard MacCutchan 21-Sep-13 3:31am
I don't have a concrete example, you will have to follow the documentation.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900