Ich schrieb: Customer c = new Customer("Marvin", 30, orders); XmlSerializer xs = new XmlSerializer(typeof(Customer)); TextWriter tr = new StreamWriter(dateiPfad, false, Encoding.Default); xs.Serialize(tr, c); tr.Close(); // XSD "c:\...\daten.xml" über VS/Tools/Eingabeaufforderung // XSD ins Projekt einbinden Ah, das sieht gut aus
Hallo Marvin, und das Schema lässt Du Dir z.B. über die "DataSet.WriteXmlSchema-Methode" aus einer Instanz der gewünschten Klasse erstellen. Ich weiss nicht ganz, was Dir da noch fehlt. Man kann natürlich nicht beliebige Klassen nutzen. Darum geht es mir aber. :-( ... Codebeispiele ... Also diese simplen, die Du da nennst gehen natürlich. Ich meinte etwa IDictionary
Hallo Michael, ich hab da ein paar fragen zum xmlserializer 1.) gibt es eine möglichkeit nicht in eine Datei zu serialisieren sondern in einen string ? ja, z.B. über den StringWriter - in diesem Beispiel: [XmlSerializer.Serialize-Methode (TextWriter, Object) (System.Xml.Serialization)] http://msdn.microsoft.com/de-de/library/d15aekdk.aspx anstatt dem TextWriter: einen StringWriter
I have created a simple three column database where the first column is auto-increment. Can someone help me change my program so that it reads the entire table and appends a new row and saves that new row in the mdb file? I'm trying to use a strongly typed dataset called DataSet3 and the line 28 never executes. It just skips to line 30. Can someone tell me what I am doing wrong? Thanks
This is the error I am getting: Server was unable to process request. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.Services.Protocols.SoapException: Server was unable to process request. Source Error