xml using reading caracters

  • Thread starter janiotjoeawie via AccessMonster.com
  • Start date
J

janiotjoeawie via AccessMonster.com

Hi,

I need an xml export of a query.
I do this by just creating the xml file manual:
Set rs = CurrentDb().OpenRecordset("qry_xml")
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("c:\testfile.txt", True)
a.WriteLine ("<?xml version=""1.0"" encoding=""UTF-8"" ?>")
a.WriteLine ("<dataroot xmlns:blush:d=""NAME:project Support"" xmlns:
xsi=""Generated by NAME "" xsi:noNamespaceSchemaLocation=""""
generated=""2006-06-09T13:40:26"">")

Do Until rs.EOF
a.WriteLine ("<WI_XML>")
a.WriteLine ("<PROGRAMMAID>" & rs!PROGRAMMAID & "</PROGRAMMAID>")

a.WriteLine ("<PROGRAMENAME>" & sProgrameName & "</PROGRAMENAME>")
a.WriteLine ("<CURSUSID>" & rs!CURSUSID & "</CURSUSID>")
a.WriteLine ("<Course_Year>" & rs!JAAR & "</Course_Year>")

a.WriteLine ("<Course_Name>"& rs!OMSCHRIJVING & "</Course_Name>")

' <BEGINDATUM>2005-06-20T00:00:00</BEGINDATUM>
' <EINDDATUM>2005-07-01T00:00:00</EINDDATUM>
' <DEADLINE>2005-05-01T00:00:00</DEADLINE>
a.WriteLine ("<KOSTEN>" & rs!KOSTEN & "</KOSTEN>")
a.WriteLine ("</WI_XML>")
rs.MoveNext
Loop
a.WriteLine ("</dataroot>")
a.Close

this works fine for me on normal text.
But we are also using french texts wich contains a lot of reading and writing
caracters.
My question is how to get this texts in my xml <Course_Name> with out have
problems that some caracters are not reconized.

Regards
 
O

onedaywhen

J

janiotjoeawie via AccessMonster.com

Yes I do,

But this does not work for me because, if the field is emty access will not
produce this specific tag. I need them all even if they are empty.

I need an xml export of a query.
I do this by just creating the xml file manual:
[quoted text clipped - 3 lines]
But we are also using french texts wich contains a lot of reading and writing
caracters.

Are you aware that ADO recordsets have a Save method with one of the
formats being XML?

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdmthrstsave.asp

Jamie.

--
 
J

janiotjoeawie via AccessMonster.com

HI,

I've found the problem, In the beginning I've used UTF-8 enconding, but what
I neede was ISO-8859-1


Yes I do,

But this does not work for me because, if the field is emty access will not
produce this specific tag. I need them all even if they are empty.
[quoted text clipped - 10 lines]
 
Top