GetXml and naming conventions

Naming Conventions

Randy Castleberry
1 min readMar 27, 2021

I remember reading and following threads on naming conventions for the .net framework when I was younger, and it was fascinating to see those ideas form into the structure of Powershell. So one day I mention that I could probably drive an alert with powershell, and sure enough someone on github had an example:
https://gist.github.com/altrive/72594b8427b2fff16431

Naturally I want to muck around with the xml content, but it’s missing a few methods. It’s a Dom.XmlDocument, that won’t work with the regular xml serialization framework, no .OuterXml , ToString is being boring and just delivering a typename. ConvertTo-Xml doesn’t give me a string I can use.

Poke around at the docs:

What’s GetXml() ? It’s so boringly and simply named. It dumps the string representation of the XML, no encoding options, no namespaces, no routing to outputs — just brutal simplicity.

I really want to find the discussion on that method one day.

--

--

No responses yet