You need to sign in to do that
Don't have an account?
Walter@Adicio
How do i add "encoding" attribute to xml document with xmlStreamWriter?
This gives error "System.XmlException: Attribute not associated with any element".
w.writeStartDocument(null, '1.0'); w.writeAttribute(null, null, 'encoding', 'UTF-8');
To add encoding attribute use:
w.writeStartDocument('UTF-8', '1.0');
First value is encoding(String) and second one is version(String).
Please let me know if this works
All Answers
To add encoding attribute use:
w.writeStartDocument('UTF-8', '1.0');
First value is encoding(String) and second one is version(String).
Please let me know if this works
You can read more about it at
http://www.salesforce.com/us/developer/docs/apexcode/index.htm
thank you blombardis