Hi David,
Are you trying to import your *own* XML files?
You use the Export-CliXml cmdlet to serialize a .NET object/collection into
an XML file. You can read it back into an object using the Import-CliXml
cmdlet.
For more help and usage examples, type:
PS > help Import-Clixml -full
PS > help Export-Clixml -full
BTW, the first line of exported file (using export-clixml) should look like:
<Objs Version="1.1" xmlns="http://schemas.microsoft.com/powershell/2004/04">...
To import your own XML files, try:
PS > $xml = [xml] (get-content Client_Suddenlink-NewHire_Export-20080421.xml)
PS > $xml
---
Shay Levi
$cript Fanatic
http://scriptolog.blogspot.com
DT> I'm trying to import an XML file to a variable, and I get the
DT> following error:
DT>
DT> % $client = import-clixml
DT> Client_Suddenlink-NewHire_Export-20080421.xml
DT> Import-Clixml : Element 'Objs' with namespace name
DT> 'http://schemas.microsoft.com/powershell/2004/04' was not found. Lin
DT> e 1, position 40.
DT> At line:1 char:24
DT> + $client = import-clixml <<<<
DT> Client_Suddenlink-NewHire_Export-20080421.xml
DT> I can't post the entire XML file, but I can post the first line,
DT> which is what is causing the cmdlet to stop:
DT>
DT> <?xml version="1.0" encoding="UTF-8"?><VisionDataExchange xmlns:xsi
DT> = "http://www.w3.org/2001/XMLSchema-instance">
DT>
DT> Can anyone tell me what's wrong here?
DT>