Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: TransformXML files stored as USC-2 rather than UTF-8 >Thread Next - Re: TransformXML files stored as USC-2 rather than UTF-8 Re: TransformXML files stored as USC-2 rather than UTF-8To: NULL Date: 9/12/2006 2:07:00 PM
The code I am using is
Application.ExportXML _
ObjectType:=acExportTable, _
DataSource:="Testlet_Entry", _
DataTarget:=strTempXML, _
Encoding:=acUTF8, _
WhereCondition:="Testlet_Id=4350", _
AdditionalData:=objOrderInfo
This produces strTempXML in UTF-8 format, followed by
Application.TransformXML strTempXML, _
strXSLDirectory & "Testlet_Entry_Out.xsl", strSourceDirectory &
"Testlet_Entry.xml"
Which transforms strTempXML in UTF-8 format into Testlet_Entry.xml in USC-2
format. The XSL Testlet_Entry_Out.xsl is as follows.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" encoding="utf-8" media-type="text/xml" indent="yes"/>
<xsl:template match="dataroot">
<test>
<xsl:apply-templates select="Testlet_Entry"/>
</test>
</xsl:template>
"Anthony Jones" wrote:
>
> "Nick" <Nick@d...> wrote in message
> news:7EFEC7B0-C48C-40A5-A432-BFF08C5A4F24@m......
> > I am trying to export tables in access to transformed XML. I am using
> >
> > Application.ExportXML
> >
> > followed by
> >
> > Application.TransformXML
> >
> > The file produced from export is UTF-8 Cookie, but when I transform it
> with
> > Application.TransformXML with a style sheet that starts with the
> following I
> > get a USC-2 file instead of the required UTF-8 file.
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> > version="1.0">
> > <xsl:output method="xml" encoding="utf-8" media-type="text/xml"
> indent="yes"/>
> >
> > I am determining the encoding of the file from a text editor.
> >
> > I have tried using MSXML2 and XMLWriter
> >
> > Dim XMLDoc As MSXML2.DOMDocument
> > Dim XSLDoc As MSXML2.FreeThreadedDOMDocument
> > Dim XSLProcessor As MSXML2.IXSLProcessor
> > Dim Str = New Stream
> >
> > to set the encoding but they all require a stream data type to read the
> file
> > that I do not seem to be able to access in the VBA access.
> >
> > All the documentation
> >
> > 1) Set the encoding for TransformXML
> > 2) Set the default encoding to UTF-8
> > 3) How to use streaming in VBA
> > 4) Any other ideas?
>
>
> We really need to see the code where you actually generate the output as
> save it to the file.
>
>
> >
>
>
>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
