[Mono-list] Modify XML Docs (part 2)

Pablo Fischer pablo@pablo.com.mx
Sun, 05 Oct 2003 15:37:41 -0500


Uhm..=20

After sending the last reply I think in that option..=20

1. Load the xml file like you and Miguel says
2. Work in the array list with add/remove
3. After closing the app (delete_event), creates the new xml file

Is it a good idea?

Thanks!
El dom, 05-10-2003 a las 14:44, Ben Maurer escribi=F3:
> On Sun, 2003-10-05 at 14:52, Pablo Fischer wrote:
> > Hello Miguel!
> >=20
> > Well Im creating something like that, cause I'm loading the xmlfile
> > (LoadConfigFile) in a struct like this:
> >=20
> >   private struct ConfigInfo {
> > 	string username;
> > 	string password;
> > 	string url;
> > 	string identifier;
> >   }
> >=20
> > So if the file exists I 'load' the file in a struct
> >=20
> > ConfigInfo[] configtmp =3D new ConfigInfo[node_username.Count];
> >=20
> > And then start 'saving' the xml data in the struct.=20
> >=20
> > Once I have the configtmp loaded I just use it every time I need some
> > information. But what happens if the user wants to remove an account
> You can use an array list so you can add/remove accounts (see the msdn
> docs)
> >  or
> > modify something (like the password)
> you can modify the information
> > , how can I save that to my xml
> > file?
> Reserialize it. Read the msdn docs.
>=20
> As well, both monologue and monodoc have some examples of Xml
> Serialization, you may want to check them out.
>=20
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
--=20
Pablo Fischer Sandoval (pablo [arroba/at] pablo.com.mx)
http://www.pablo.com.mx
http://www.debianmexico.org
GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C
Firma URL: http://www.pablo.com.mx/firmagpg.txt