Link to home
Start Free TrialLog in
Avatar of DanDWolff
DanDWolffFlag for United States of America

asked on

powershell write-xml line

I have to recreate an xml file to import into a program.  The line I am having problems recreating looks like this
<Type xmlns="http://www.microsoft.com/provisioning/EapCommon">11</Type>

I can write the element type and add the xmlns attrbuite but I don't know how to add the value and then close the element.  The closes I have gotten is

<Type xmlns="http://www.microsoft.com/provisioning/EapCommon"/>

using this code
$xmlWriter.WriteElementString('Type')                                    $XmlWriter.WriteAttributeString('xmlns',"http://www.microsoft.com/provisioning/EapCommon")

What do I need to do to get the lines to match

Thanks

Dan
ASKER CERTIFIED SOLUTION
Avatar of DanDWolff
DanDWolff
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial