Exporting XML data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a access table that I want to export to an XML file. I can do that fine but unfortunately Access adds a load of information at the top of the XML document that I don't need i.e.

<?xml version="1.0" encoding="UTF-8"?><dataroot xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Student%20Records.xsd" generated="2004-02-19T10:45:45"><Student_x0020_Records><studentid>1</studentid

Ideally I would like the xml file to start :

<?xml version="1.0" encoding="UTF-8"?><studentid>1</studentid

Is there anyway I can remove the top few lines ? I am not that sure about XML but have a feeling that a schema could do this but I am not 100 % sure

Thank you for your time

Craig
 
Not sure if you can get Access to do it using the built-in tools.
I kind of doubt it, but could be wrong.

A simpler approach would be to let Access export the file, examine the
header, define where the data begins and then open the file in code, strip
out the old header, insert your new header and close the file.
--
Joe Fallon
Access MVP



Craig said:
Hi,

I have a access table that I want to export to an XML file. I can do that
fine but unfortunately Access adds a load of information at the top of the
XML document that I don't need i.e.
<?xml version="1.0" encoding="UTF-8"?><dataroot
xmlns:od="urn:schemas-microsoft-com:officedata"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="Student%20Records.xsd"
generated="2004-02-19T10:45:45"> said:
Ideally I would like the xml file to start :

<?xml version="1.0" encoding="UTF-8"?><studentid>1</studentid>

Is there anyway I can remove the top few lines ? I am not that sure about
XML but have a feeling that a schema could do this but I am not 100 % sure.
 
Back
Top