PowerShell – Format EDI files and Rename them based on contents

This is an enhancement to a prior blog: PowerShell RegEx Parse EDI. It takes that example to the next step and uses the parsed data to rename the file. It also formats the file by changing the end segment character to the same followed by a carriage-return and line feed. NOTE: Use this program at […]

LINQ/XML Query Expressions Examples

The following relates to the previous two blogs. You can get the surrounding code in that C# LINQ/XML example blog. LINQ can run against different data sources, including XML an SQL. So once you learn how to write the query expressions as shown below, you can switch back and forth between them with ease. This […]

C# LINQ XPath Examples

The following relates to this XML from yesterday’s blog. You can get the surrounding code in that blog. It’s advisable to use the LINQ style of query when possible, but there might be that day where you have a long complicated XPath, and you just want to use with an XElement that you loaded from […]

LINQ XML Navigation Example

Example of how to create XML in memory using LINQ, then how to retrieve elements and attributes from it in the LINQ style. In a future blog, I will show you how to use XPath, and then LINK Query Expressions. This is a sample from Complete Guide to XML for Microsoft Developers (Udemy Course). using […]

Why JavaScript Programmers are so Bonkers for JSON

JavaScript programmers love JSON because it is “baked-in” to the JavaSCript programmnig language. For those of using C#, Python, or Java, we have to use class libraries to assist us with the normal functions that are super-easy in JavaScript. This blog shows you most of you what you need to know about JSON in one […]

Linux/Ubuntu Bash Script to Send All Files in a directory via SFTP

The following script can be scheduled as a “CRON JOB”. It looks at all files (optionally with a file mask) in a given directory, and sends them to a specific SFTP site. This example uses a private key, and the name of that key file is passed as the -i argument on the stp command […]

Generate XSD Schema from XML using PowerShell

I found a C# example of how to create a schema from an XML file here. I wanted to do the same in PowerShell, and this is what I came up with. I left some of the C# code in the script below in comments, just for comparison purposes. The program uses the .NET Schema […]

XPath Axes

This blog shows the shortcuts (i.e. abbreviations) for the most common XPath axes (plural of axis): [table id=2 /] Reference: https://our.umbraco.com/documentation/reference/templating/macros/xslt/xpath-axes-and-their-shortcuts Also see example on the sites below: https://www.way2tutorial.com/xml/xpath-axes.php https://www.w3schools.com/xml/xpath_axes.asp

Recent Posts




All Rights Reserved Theme by 404 THEME.