code [npq]
-
I just rewrote lots of my code in my application last night (simpilfied ~25 lines into 3 (with use of a function (also 3 lines)) and now the features run faster and don't crash. Arrughh! I can't believe that it could have been simpified to that.. (it was dealling with XML processing) Has this happened to anyone else? -Steven npq=not (a) programming question
By reading this message you are held fully responsible for any of the mispelln's or grammer, issues, found on, codeproject.com.
For those who were wondering, actual (Linux) Penguins were harmed in creating this message.
Visit Ltpb.8m.com
404Browser (Efficient, Fast, Secure Web Browser): 404Browser.com -
I just rewrote lots of my code in my application last night (simpilfied ~25 lines into 3 (with use of a function (also 3 lines)) and now the features run faster and don't crash. Arrughh! I can't believe that it could have been simpified to that.. (it was dealling with XML processing) Has this happened to anyone else? -Steven npq=not (a) programming question
By reading this message you are held fully responsible for any of the mispelln's or grammer, issues, found on, codeproject.com.
For those who were wondering, actual (Linux) Penguins were harmed in creating this message.
Visit Ltpb.8m.com
404Browser (Efficient, Fast, Secure Web Browser): 404Browser.comYup - exact same thing. Wrote 30 odd lines of code to format XML nicely, then found a method that did it for me, better and faster. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
-
I just rewrote lots of my code in my application last night (simpilfied ~25 lines into 3 (with use of a function (also 3 lines)) and now the features run faster and don't crash. Arrughh! I can't believe that it could have been simpified to that.. (it was dealling with XML processing) Has this happened to anyone else? -Steven npq=not (a) programming question
By reading this message you are held fully responsible for any of the mispelln's or grammer, issues, found on, codeproject.com.
For those who were wondering, actual (Linux) Penguins were harmed in creating this message.
Visit Ltpb.8m.com
404Browser (Efficient, Fast, Secure Web Browser): 404Browser.comYes, it has happened to me. And it's a great feeling because you know you've gained experience. -- If I had the ability to smooth talk like John Simmons, this post would be less sarcastic and more to the point.
-
Yup - exact same thing. Wrote 30 odd lines of code to format XML nicely, then found a method that did it for me, better and faster. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
Christian Graus wrote: then found a method that did it for me, better and faster Was it something you found on CP? Or someplace else? Do tell! Do tell! :-D
-
Christian Graus wrote: then found a method that did it for me, better and faster Was it something you found on CP? Or someplace else? Do tell! Do tell! :-D
No, just something that the .NET framework provided by itself. I forget the details, did you want me to find them out for you ? The code is at home.... Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
-
No, just something that the .NET framework provided by itself. I forget the details, did you want me to find them out for you ? The code is at home.... Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
Christian Graus wrote: did you want me to find them out for you ? Sure! When you get a chance... :D
-
Christian Graus wrote: did you want me to find them out for you ? Sure! When you get a chance... :D
It looks like this:
StringBuilder sbDocString = new StringBuilder(); StringWriter swControlWriter = new StringWriter(sbDocString); XmlTextWriter oDocWriter = new XmlTextWriter(swControlWriter); oDocWriter.Formatting = Formatting.Indented; XmlDocument doc = new XmlDocument(); doc.LoadXml(sXML); doc.Save(oDocWriter); return sbDocString.ToString();
sXML is a string of XML passed into the function. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002