Exporting XML data

C

Craig

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:eek:d="urn:schemas-microsoft-com:eek:fficedata" 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
 
J

Joe Fallon

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:eek:d="urn:schemas-microsoft-com:eek:fficedata"
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top