Lessons Learned

My drop-site for interesting snippets and tips. If it's useful to you as well, great!

Browse by Tags

Tagged Content List
  • Blog Post: Namespaces, Why Does It Always Have To Be Namespaces?

    I’ll be honest, I LOATHE namespaces in XML.  I haven’t seen a case where I needed to use them to differentiate between identically-named elements in different contexts.  So often, the document declares a namespace at the top and never overrides it.  In that case, why use it? Why do I hate...
  • Blog Post: Selecting an XML Element by #text value

    This is actually just a wrapper for the [text()=’value’] XPATH attribute.  As I said in a previous post, this blog is my own knowledge base.  When I need this, and I’m sure I will, I’ll remember writing this entry, search my blog, and there it is! This will be used in a subsequent post about...
  • Blog Post: One-Liner: Case-Insensitive XML Queries

    I'm a one-trick pony with XML. I use $xml.SelectNodes("//name[@attribute='value']") and permutations thereof. However, XML's SelectNodes() and SelectSingleNode() methods are case-sensitive. My coworker Keith Munson found this tidbit: $xml.SelectNodes("//element[translate(@AttributeName, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ...
Page 1 of 1 (3 items)