c# - Simple client server to send XML information to CRUD database -
i need develop resident app info win32_baseboard class when required app xml without create file , app must insert or update information on database.
i saw few apps have create file , don't know if exists that.
the code below create memory stream data instead of writing file.
///old code //xmlserializer serializer = new xmlserializer(typeof(appconfig)); //streamwriter writer = new streamwriter(filename); //serializer.serialize(writer, config); //new code string input = "your xml here"; string output = ""; xmlserializer serializer = new xmlserializer(typeof(appconfig)); memorystream mstream = new memorystream(encoding.utf8.getbytes(input)); streamwriter writer = new streamwriter(mstream); serializer.serialize(writer, config);
Comments
Post a Comment