Link to home
Start Free TrialLog in
Avatar of codequest
codequest

asked on

Change XMLDocument Encoding

I've loaded the xml below into an XMLDocument (call it XmlDoc).

Is there a way to programmatically change the encoding attribute value to "utf-8" (or whatever),
OTHER than doing a string replace on the innerText of the XMLDocumentDeclaration?

'===========================================
<?xml version="1.0" encoding="utf-16" ?>
<Control>
      <Value1>
            <SubVal1A>Units</SubVal1A>
            <SubVal1B>Type</SubVal1B>      
      </Value1>
      <Value2>
            <SubVal2A>Over</SubVal2A>
            <SubVal2B>Load</SubVal2B>
      </Value2>
</Control>
ASKER CERTIFIED SOLUTION
Avatar of codequest
codequest

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