Avatar billede schoesler Nybegynder
30. august 2006 - 19:17 Der er 5 kommentarer og
1 løsning

.xml import/eksport

Hej Eksperter. Er der nogen der har eksempler liggende på import/eksport af .xml filer til og fra ACCESS?

/Jan
Avatar billede schoesler Nybegynder
30. august 2006 - 19:24 #1
Koden til xml filen ser sådan ud...

  <?xml version="1.0" encoding="UTF-8" ?>
- <form1>
- <!-- ******************************************************************************

If you filled in a form:

    This file contains data that was entered into a form.
    It is not the form itself.

******************************************************************************

If you receive this data file:

    Please follow the directions below to process this data file using
    Adobe Acrobat Professional 7

**To view the completed form:
    1) Save this data file to your computer.
    2) Open a blank copy of the original PDF form that the form filler
      completed in order to generate this data file.
    3) In Acrobat, choose Advanced > Forms > Import Data to Current Form
      and browse for this data file.
    4) You will see the form with the data in it.
    5) To save a copy of the form with the data in it, choose File > Save As
      and save the file.

**To create a spreadsheet from one or more form data files you have received:
    1) Save the data files to a place on your computer, giving each file a
      unique name and making sure not to delete the '.xml' file extension.
    2) In Acrobat, choose File > Form Data > Create Spreadsheet from Data Files.
    3) Click the 'Add Files' button to chose the data files.
    4) After the data files are added, click the 'Create Spreadsheet' button
      to create a Spreadsheet that contains data from selected data files.

******************************************************************************
  -->
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
- <TextField5>
- <body xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xmlns="http://www.w3.org/1999/xhtml" xfa:APIVersion="Acroform:2.2.4333.0" xfa:spec="2.1">
  <p style="margin-top:0pt;margin-bottom:0pt;text-valign:middle;font-family:'Myriad Pro';font-size:10pt;font-weight:normal;font-style:normal">Test</p>
  </body>
  </TextField5>
  <Name>Jan Schøsler</Name>
  <Period>30/09-2006 - 07/10-2006</Period>
  <TextField3>Tanker Safety</TextField3>
  <TextField4>Marnav</TextField4>
  </form1>
Avatar billede terry Ekspert
30. august 2006 - 19:55 #2
Hi Jan

I am no expert at XML but to me it deosnt look like it is correctly formatted. Also if I try opening it in Explorer it gives an error, and also when I try importing it into Access?

Waht are you trying to do with the file (other than importing it)?
Avatar billede schoesler Nybegynder
30. august 2006 - 21:51 #3
Hi Terry

Koden ovenfor kommer fra en dynamisk PFD fil. Et PDF dokument med felter, checkbokse.

Kunne godt tænke mig om man kunne importere det til en db

Hilsen Jan
Avatar billede terry Ekspert
31. august 2006 - 09:40 #4
I've had another look at the file and there were a couple of errors which I have corrected. Then try importing it into Access just choose xml from the type of file list.

You will get a dialog which will allow you to make two tables, body and form1. You can choose either or both.

Hope thats what your after.

Regards Terry



<?xml version="1.0" encoding="UTF-8" ?>
<form1>
<!-- ******************************************************************************

If you filled in a form:

    This file contains data that was entered into a form.
    It is not the form itself.

******************************************************************************

If you receive this data file:

    Please follow the directions below to process this data file using
    Adobe Acrobat Professional 7

**To view the completed form:
    1) Save this data file to your computer.
    2) Open a blank copy of the original PDF form that the form filler
      completed in order to generate this data file.
    3) In Acrobat, choose Advanced > Forms > Import Data to Current Form
      and browse for this data file.
    4) You will see the form with the data in it.
    5) To save a copy of the form with the data in it, choose File > Save As
      and save the file.

**To create a spreadsheet from one or more form data files you have received:
    1) Save the data files to a place on your computer, giving each file a
      unique name and making sure not to delete the '.xml' file extension.
    2) In Acrobat, choose File > Form Data > Create Spreadsheet from Data Files.
    3) Click the 'Add Files' button to chose the data files.
    4) After the data files are added, click the 'Create Spreadsheet' button
      to create a Spreadsheet that contains data from selected data files.

****************************************************************************** -->
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <CheckBox1>1</CheckBox1>
  <CheckBox1>0</CheckBox1>
  <TextField5>
  <body xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xmlns="http://www.w3.org/1999/xhtml" xfa:APIVersion="Acroform:2.2.4333.0" xfa:spec="2.1">
  <p style="margin-top:0pt;margin-bottom:0pt;text-valign:middle;font-family:'Myriad Pro';font-size:10pt;font-weight:normal;font-style:normal">Test</p>
  </body>
  </TextField5>
  <Name>Jan Schoosler</Name>
  <Period>30/09-2006 - 07/10-2006</Period>
  <TextField3>Tanker Safety</TextField3>
  <TextField4>Marnav</TextField4>
  </form1>
Avatar billede schoesler Nybegynder
08. september 2006 - 16:08 #5
Jeg lukker spørgsmålet da jeg ikke er helt klar over hvad jeg vil :-) God Weekend
Avatar billede terry Ekspert
10. september 2006 - 19:48 #6
Thanks Jan, and a good weekend to you too (whats left of it)
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Dyk ned i databasernes verden på et af vores praksisnære Access-kurser

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester