eWorld.UI - Matt Hawley

Ramblings of Matt

Copying XML Nodes from a Doc to Another

March 3, 2005 20:23 by matthaw

This should be filed as, “that’s pretty cool – I didn’t know that.” So for all of you SDK reading zealots out there, stay away - far away…I don’t want any comments (yet I have a feeling this statement will generate the fury that enrages them to post) stating “its in the SDK, just read it.” As I’ve said time and time again, when you have to work with the stuff day in and day out and only look up the stuff you need when appropriate, this theory just doesn’t work… so I don’t want to hear it, ‘kay?

So, getting away from my angst, I wanted to explain and show how you can copy (or clone) XML Nodes from one XML Document to another. This comes up if you need to generate a document based on another one, but you also need to add other items…kinda a “combination” document so-to-speak. Looking through the SDK, I noticed the ever ellusive “Clone” method, and its sister method “CloneNode”. Thinking about it, I figured – hey, that would probably work the way I want, right?

Well, partially…there’s another step you need to take to properly clone XML nodes. Prior to calling AppendChild, you need to call ImportNode on the destination XML document. This will then change it’s internal mappings to the new document. So, the code looks like:

XmlDocument doc1 = new XmlDocument();
doc1.Load(“Document1.xml”);

XmlDocument doc2 = new XmlDocument();
XmlElement docElement = doc2.CreateElement(“Document2”);
XmlElement docClone = doc2.ImportNode(doc1.SelectSingleNode(“/Document1/ToClone”).Clone(), true);

docElement.AppendChild(docClone);
doc2.AppendChild(docElement);

So, there you have it…a way to clone a node from one document to another, easily.



Categories: .NET
Actions: E-mail | Permalink | Comments (2) | Comment RSSRSS comment feed

Prepping for ASP.NET 2.0

February 14, 2005 22:09 by matthaw
TheServerSide.net has just posted a blip on free training from MSDN on ASP.NET 2.0. The first in the series of 6 CDs is now available. So, if you’ve had little time to play with the next versions, I think this CD will become invaluable to you, as it probably will for me.

Categories: .NET
Actions: E-mail | Permalink | Comments (1) | Comment RSSRSS comment feed

McLaws on Interviews

February 4, 2005 22:43 by matthaw

Last night, Robert McLaws posted the 3 interviews he has coming up with some superb names over at Microsoft. Normally, I like to see his things crash & burn (VisualBlogger 2004(5) anyone?), but this time around I’m supporting him. I just popped over to see if he’s received any comments concerning the interviews, and heartbreakingly enough, he’s received none. Personally, I don’t have any questions, otherwise I’d post them…but I know there are a few of you out there that have that undying canny for creating obscure questions that makes guys like these squirm because of NDA.

So, hop on over to his posts and submit a question for John Montgomery, Brian Goldfarb, and Don Box.



Categories: .NET
Actions: E-mail | Permalink | Comments (1) | Comment RSSRSS comment feed

When DateTime.MinValue Attacks

December 30, 2004 00:22 by matthaw

The other day I purchased myself a new Dell server for home, and when checking out my order status on their .NET Web App, I noticed this nice piece of information under the section of viewing all previous orders by my customer number.

MinValue

Being this close to Christmas, the only possible solution is that Jesus must have bought my server for me. Heh, beat that Santa!



Categories: .NET
Actions: E-mail | Permalink | Comments (3) | Comment RSSRSS comment feed

My First Bug Stopped by TDD

December 19, 2004 06:48 by matthaw

So I’m working on a side job, and I’ve been using the great & wonderful Test Driven .NET, but thats not the point of this post. What the point is, is that for the first time since I’ve started doing TDD (which – I might add, is very short), running my tests proved to me that a bug existed in code as I modified it. Yes, thats right – 3 tests failed, so I spent about an hour digging down in my buisness logic to try and find out why. Alas, I finally did find out why, and it was because of a change I had made.

Thank you TDD, it stopped a bug that I probably wouldn’t have noticed from being deployed and my client seeing!



Categories: .NET
Actions: E-mail | Permalink | Comments (1) | Comment RSSRSS comment feed

Beta Day: FogBugz 4.0 and VS.NET 2005

December 15, 2004 23:18 by matthaw

So today I decided it was going to be a beta day, well really, I was just going to work in VS.NET 2005’s Nov. CTP distro that was just launched, more on this later. However, prior to lunch I got an email notifying me that I’ve been accepted into the FogBugz 4.0 beta program. Ohh yeah! Now, I’m going to keep Joel’s “Mouth Wide Shut” policy by not discussing anyting about the 4.0 beta, but I do have to say this – its stable, more powerful, and a bunch of new awesome features have been added.

With that said, its time to move onto VS.NET 2005. Wow, this thing gets better and better with each new CTP or beta that is released. I’ve spent some time just working with web apps right now, you know the basics. The one feature that was lacking in the current versions of VS.NET that I now LOVE in VS.NET 2005 is the fact that you have intellisense for custom controls – and without doing anything! By simply adding your Register directive or using the new global Registration for controls, you’ll immediately start seeing intellisense for your custom controls. You don’t realize how many times I as a web control author, have been asked “how come this doesn’t have any intellisense?” I’m also still getting used to the idea of no precompilation of web apps anymore, however I did see that you can “publish” precompiled apps to a location that will allow you to deploy those handy-dandy assemblies instead of source code.

I did notice one bug, and I’ve not read the release notes yet, but the ASP.NET configuration manager doesn’t work – at least not logged on as an admin (still haven’t tried as an admin yet). Also, I’m finally glad that binding data using the ObjectDataSource finally works…thats going to make binding to business objects soooo much easier. Wow, I’m still amazed, now – back to more playing / testing!



Categories: .NET | General | Whidbey
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Nov. CTP Installation Gotchas

December 14, 2004 23:31 by matthaw

So I’m at work and trying to install the November CTP from my one laptop to my test laptop. Here’s a few gotcha’s that you need to know when using Nero Image Drive…

  • You cannot connect directly to the virtual drive, you need to share it from your host machine.
  • The setup will fail trying to find the file VS_SETUP.MSI if installing across a network address (ie: \\192.168.25.1\vs2k5\vs). To solve this issue map a drive on your test machine to that folder and try re-running the install, works just fine. Odd how this works, bug?
  • You have to install all the products in order to not receive an error message – this was posted previously, I just want to reiterate the fact.
  • I love that we don’t have pre-reqs anymore!

Update – I can’t get it to install! ERR! Nothing I do makes a difference! Ohh, its not a clean install – any ideas from the MS camp?

Update 2 – Attempting to install the 2.0 framework individually reports that my Windows Installer service cannot be accessed. I just may go with a fresh rebuild – not like I have anything of importance.



Categories: .NET | Whidbey
Actions: E-mail | Permalink | Comments (1) | Comment RSSRSS comment feed

Development Intern Available at Integrity Technology Solutions

December 8, 2004 18:19 by matthaw
My company, Integrity Technology Solutions, is looking to take on a software development intern. If you attend a local college in Bloomington / Normal / Peoria, I’d sugest you check out and apply! Just as a FYI, our entire development team went to Illinois State University, and all started as interns here!

Categories: .NET | General
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

PDC '03 Costs

December 8, 2004 17:57 by matthaw
Yes, I said PDC ‘03, not ‘05. My boss stated that I need to get a budget going for ‘05, and since no info is available for ‘05 yet, I need to base it off of ‘03. Does anyone have the costs for PDC ‘03? Like, registration or any additional costs?

Categories: .NET
Actions: E-mail | Permalink | Comments (2) | Comment RSSRSS comment feed

PDC '05 Announced

December 8, 2004 07:40 by matthaw

[Via Julia Lerman]

PDC ‘05 has just been announced! I’m trying to get my company to send me this year!



Categories: .NET
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed


Copyright © 2000 - 2025 , Excentrics World