From the course: PowerShell for SQL Server Administration

Unlock the full course today

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

Importing XML data

Importing XML data - PowerShell Tutorial

From the course: PowerShell for SQL Server Administration

Start my 1-month free trial

Importing XML data

- [Instructor] Oftentimes when you're getting data from a third-party vendor they're going to hand you an XML file. So once we get that XML file we're going to need to do something with it. So we can import that data into PowerShell fairly easily. And from there we can then actually go ahead and do whatever it is we need to do with it. Whatever our business logic requires. XML objects can be imported into PowerShell like I said, fairly easily. And then once that data is imported we can do whatever it is that we need to do. Our business logic could be to just display it on the screen, which is what we're going to do in the demo here in a second. Or we can import that data when we do some sort of processing on that data which is probably going to be what you actually going to need to do. So you could take that data, once imported and you can pass it to a foreach loop, for example, and then you can do processing on that data row by row until you're done processing all that data. So let's…

Contents