Create XML using XML DOM. How can I set charset?

frgusto
Member Posts: 32
I'm using codeunit XML DOM Management to create an XML file.
XML DOM Management use 'Microsoft XML, v3.0'.DOMDocument.
How can I set charset for the XML file?
I'd like to use charset ISO 8859-1 for the file.
Thankyou,
Fredrik Gustafsson
XML DOM Management use 'Microsoft XML, v3.0'.DOMDocument.
How can I set charset for the XML file?
I'd like to use charset ISO 8859-1 for the file.
Thankyou,
Fredrik Gustafsson
0
Comments
-
OleProcInstr := XMLReport.createProcessingInstruction('xml',
' version="1.0" encoding="' + TxtEncoding + '"');
TxtEncoding = your charset (you can change it)
check CU 124080 -
Thanks a lot!
CU 12408 is not a standard CU? I can't find it.0 -
Name DataType Subtype Length
XMLReport Automation 'Microsoft XML, v2.6'.FreeThreadedDOMDocument
CreateXMLDoc(VAR OleXMLDoc : Automation "Unknown Automation Server.Unknown Class";TxtEncoding : Text[60];VAR OleRootNode : Automation "
XMLReport := OleXMLDoc;
IF ISCLEAR(XMLReport) THEN
CREATE(XMLReport);
OleProcInstr := XMLReport.createProcessingInstruction('xml',
' version="1.0" encoding="' + TxtEncoding + '"');
XMLReport.appendChild(OleProcInstr);
CLEAR(OleProcInstr);
OleRootNode := XMLReport.createElement(TxtRootTagName);
XMLReport.appendChild(OleRootNode);0 -
this information is stored in the xml Header. so take a look into Codeunits 6224 .. 6226 or 7902
RegardsDo you make it right, it works too!0 -
Name DataType Subtype Length
ProcInstr Automation 'Microsoft XML, v2.6'.IXMLDOMProcessingInstruction
Var Name DataType Subtype Length
Íåò Encoding Text 60
AddXMLHeader(Encoding : Text[60])
ProcInstr := XMLReport.createProcessingInstruction('xml',
' version="1.0" encoding="' + Encoding + '"');
XMLReport.appendChild(ProcInstr);
CLEAR(ProcInstr);1 -
Finally found cu 7902:
CREATE(XMLDoc); IF XMLDeclaration THEN BEGIN XMLNewProcessInst := XMLDoc.createProcessingInstruction('xml','version="1.0" encoding="UTF-8"'); XMLDoc.appendChild(XMLNewProcessInst); END;
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions