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 xmlnsd=""NAMEroject 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
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 xmlnsd=""NAMEroject 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