Click here to Skip to main content

Welcome to the Lounge

   

For lazing about and discussing anything in a software developer's life that takes your fancy.
The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct and please don't post ads.

Technical discussions are welcome, but if you need specific help please use the programming forums.


 
GeneralWell, well, well... PinmemberMatt U.30-Jan-14 11:29 
GeneralRe: Well, well, well... Pinprofessional_Damian S_30-Jan-14 11:46 
RantRe: Well, well, well... PinmemberVivic30-Jan-14 15:52 
GeneralRe: Well, well, well... PinmemberCDP180230-Jan-14 19:19 
GeneralRe: Well, well, well... PinmentorKeith Barrow30-Jan-14 22:43 
GeneralRe: Well, well, well... PinmemberMark_Wallace30-Jan-14 20:35 
GeneralRe: Well, well, well... PinmemberMatt U.31-Jan-14 5:44 
GeneralXPath. PinmemberSeptimus Hedgehog30-Jan-14 11:18 
One of those eureka moments occurred to me today. I needed to trawl through a rather heavily recursive xml file. While there weren't too many element names involved, they were sufficiently recursive enough to make it really horrible to debug in a recursive method. For sure, it worked but it didn't sit comfortably with me. It was then I recalled some XPath code I prototyped a couple of years ago. I opened the project and it occurred to me that XPath could actually simplify things for me. A couple of hours later I replaced my code with far easier to read path-like syntax. It didn't eliminate the recursion but appending new element names using subscripts just really made more sense in this case and it was a breeze to identify exactly where I was in the file.
 
I'm not advocating XPath over any other strategy to process xml files but to this humble developer, it delivered far more maintainable code. Now that I think of it, there's another method in our app which processes some of the worst xml files I've ever come across. We're talking about 300 types of element some of them with many attributes as well. XPath might just simplify that as well. To the folks who put the XPath concept together, I thank you.Thumbs Up | :thumbsup:
If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.

GeneralRe: XPath. PinmemberBillWoodruff30-Jan-14 11:21 
GeneralRe: XPath. PinmemberSeptimus Hedgehog30-Jan-14 11:24 
GeneralRe: XPath. PinmemberBillWoodruff30-Jan-14 14:52 
JokeRe: XPath. Pinmember d@nish 30-Jan-14 16:52 
GeneralRe: XPath. PinmemberMark_Wallace30-Jan-14 20:36 
GeneralRe: XPath. PinmemberSeptimus Hedgehog30-Jan-14 21:02 
GeneralMust everything have an API? PinmemberKent Sharkey30-Jan-14 11:05 
GeneralRe: Must everything have an API? PinadminMatthew Dennis30-Jan-14 11:15 
GeneralRe: Must everything have an API? PinmvpRanjan.D30-Jan-14 11:19 
GeneralRe: Must everything have an API? PinmemberKent Sharkey30-Jan-14 11:22 
QuestionRe: Must everything have an API? PinmvpNish Sivakumar31-Jan-14 3:57 
GeneralRe: Must everything have an API? PinprofessionalRavi Bhavnani30-Jan-14 11:20 
GeneralRe: Must everything have an API? Pinmember d@nish 30-Jan-14 16:57 
JokeRe: Must everything have an API? PinmemberMarcus_230-Jan-14 20:48 
GeneralRe: Must everything have an API? Pinmember d@nish 30-Jan-14 21:38 
GeneralRe: Must everything have an API? PinmvpNish Sivakumar31-Jan-14 3:59 
GeneralRe: Must everything have an API? PinprofessionalRavi Bhavnani31-Jan-14 12:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.140709.1 | Last Updated 11 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid