A while ago, I needed to investigate reboot events on some Windows 10 systems. I wanted to use the console instead of the eventvwr GUI Event Viewer.
There is a tool for that called wevtutil which – like eventvwr – uses XPath query parameters and produces XML output.
Postprocessing XML can be a thing, but since .NET has great XML support, you can use PowerShell for that (which for me often is way easier than going the XSLT route, for instance because Windows lacks built-in console XSLT tooling).
Based on the help and the below links, my query command then on these machines turned out to be this: Read the rest of this entry »
The iTunes library xml file is in the same directory as the .itl file. The file is in Apple plist format, and Python’s standard library has a good parser for it.
On my list of Visual Studio Code extensions to try (after I change the shortcuts, as direct Alt shortcuts are not a good idea, luckily those are configurable)
VSCode extension that checks for broken links in an HTML, XML, RSS, PHP, or Markdown file.
…
Checks currently open file:
for broken links in anchor-href, link-href, img-src, and script-src tags in currently-open HTML or PHP file
both clearnet and onion (Tor) links
for badly-formatted mailto links, and duplicate local anchors (anchor-name, anchor-id)
for working HTTPS equivalents of HTTP links
Optionally checks for invalid characters and common mistakes (missing tag content, empty attribute value, more).
Also checks for errors in a small subset of semantic HTML tags (in HTML and PHP files): checks that each page has header, main, footer; checks that each heading is inside a section, article, or aside; checks that each section/article/aside has exactly one heading in it; checks that heading values are nested properly.
…
To see/change settings for this extension, open Settings (Ctrl+,) / Extensions / “HTML / XML / RSS link checker”.
To change the key-combinations for this extension, open File / Preferences / Keyboard Shortcuts and search for Alt+H or Alt+T or Alt+M or Alt+L.
Always wondered why I couldn’t find a method that would XML encode a string, effectively escaping the 5 illegal characters for XML. There is such a method but its location in the API is not intuitive at all. It’s in the System.Security namespace: [Wayback] SecurityElement.Escape(String) Method (System.Security) | Microsoft Docs
A few links for my link archive, as I often edit XML files (usually with different extensions than .xml, because historic choices that software development vendors make, which makes it way harder to tell editors “yes, this too is XML).
[WayBack] XPath Tools – Visual Studio Marketplace: Extension for Visual Studio – Run XPaths and XPath functions. Browse through results at the click of a button.Track and copy XPaths incl. XML namespaces in various formats, taking the hassle out of complex documents
This plugin is a small set of useful tools for editing XML with Notepad++. The plugin is libXML2-based. The plugin features are:
– XML syntax Check
– XML Schema (XSD) + DTD Validation
– XML tag autoclose
– Pretty print
– Linarize XML
– Current XML Path
– Conversion XML <-> Text
– Comment / Uncomment
– XPath expression evaluation
Author: Nicolas Crittin
Homepage: https://github.com/morbac/xmltools
SQLcl, the modern command-line interface for the Oracle Database, can now be downloaded directly from the web without any click-through license agreement.
It means the Oracle acount restriction will be lifted, and downloads will be a lot simpler.
I started with the below failing command, tried a lot of things, then finally almost gave up: Oracle stuff does not want to be automated, which means I should try to less of their stuff.
First of all you need an Oracle account (I dislike companies doing that for free product installs; I’m looking at Embarcadero too) by going to profile.oracle.com:
This version supports both 32bit and 64bit and subsequently does not have a JDK bundled with it. It has a
dependency on the jdk8 package to meet the application’s JDK requirement.
An Oracle account is required to download this package. See the “Package Parameters” section below for
details on how to provide your Oracle credentials to the installer. If you don’t have an existing account, you can
create one for free here: https://profile.oracle.com/myprofile/account/create-account.jspx
To have choco remember parameters on upgrade, be sure to set choco feature enable -n=useRememberedArgumentsForUpgrades.
Then the installation failed fail again: ERROR: The response content cannot be parsed because the Internet Explorer engine is not available, or Internet Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again.
The trick is to RUN IEXPLORE.EXE AS ADMINISTRATOR ONCE BEFORE INSTALLING FROM CHOCOLATEY. Who would believe that.
The reason is that the package uses Invoke-WebRequest which requires Internet Explorer and PowerShell 3. Chocolatey packages however need to be able to run on just PowerShell 2 without Invoke-WebRequest.
A while ago, a co-worker did not believe when I told that default XML encoding really is UTF-8 (and tried to force it to utf-8), and that if the content had byte sequences different from the (either specified or default) encoding, it was a problem.
I though I blogged about the default, and where to find it, but apparently, I did not.
Under the very specific circumstances of a UTF-8 encoded document with no external encoding information (which I understand from the comments is what you’re interested in), there is no difference between the two declarations.