From the course: PowerShell: Functions for Advanced Automation

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Work with complex XML files

Work with complex XML files

From the course: PowerShell: Functions for Advanced Automation

Start my 1-month free trial

Work with complex XML files

- [Instructor] I want to continue this video where the previous one left off. We edited one of the elements in an XML formatted variable and wrote the entire variable back to the hard drive. Editing the content of one element is simple enough, now we are going to take a look at adding depth to the XML data by adding child elements. Also, were going to take a look at creating whole new records. First, a quick look at the structure of the XML file. Each section that begins with a tag and ends with a matching closing tag, is an element. The employee with the ID 010101, is an element, just as an email address would be considered a single element. All of the details that we're storing about this on employee are considered Child Elements. They are child elements to the employee. Lets scroll down and take a look at our friend Bernard. Here we see that Bernard is employee ID 080808 ID 080808 ID 080808 with several different child elements that are the properties of that object. And if we take…

Contents