OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Noob question: Getting XML out of form data

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
paeon
General User
General User


Joined: 11 Feb 2007
Posts: 15
Location: Chicago

PostPosted: Sun Feb 11, 2007 12:22 pm    Post subject: Noob question: Getting XML out of form data Reply with quote

Hi,
I've been trying to do something for years now, and can't. Hoping Open Office would be the answer.
I don't need to or want to use a database program for this, unless it is the last straw.

Problem:
You can create a PDF form in Acrobat Professional, which allows a user to enter information. The form data can be exported as basic XML. I can use this XML doc to automate page layout (I work for a publisher).

For example: If I have a text box control called Title, and the content in the control is "From Here to Eternity", when I export form data as XML I get:

<title>From Here to Eternity</title>

Which is what I want. Which is ALL I want.

It would be great if I could have writers write copy in this form, then save it, send it to me and I could export the XML. Unfortunateely, Acrobat will not allow this unless the writer also has Professional, which is very expensive. If a writer is seeing a form in Reader(which is free), they can only fill in data and submit it to an email account or cgi script, but they cannot save the data. So if they were writing, and wanted to save and edit the form later, they can't. Adobe doesn't allow it. Which is STUPID. But there you are.

All writers do have Word. You can make a similar form in Word, but, you can't export the form data as a simple, straightforward XML doc. I work on a Mac, by the way, as do the writers and editors.

So what I want to be able to do, is create a form such that every field name gets saved or exported as an XML element, and the field content gets saved or exported as parsed character data.
Also, I don't need to put the XML into a database, nor do I intend it for the World Wide Web. I just need it as simple XML so I can map the elements to page layout styles in InDesign.

I started to look at Open Office, because, presumablly, it is an XML format, and because it is cross platform (and also free).

So why can't i get straightforward XML out of it? Writer only lets you save as DocBook, MS XML, or XHTML, when I need to make my own proprietary element tags. And Writer does NOT save the field content. That is if I have a field "Title" and a text box beside it, and save as XML, I only get "Title", but not the content inside the text box. Very annoying.
Back to top
View user's profile Send private message
paeon
General User
General User


Joined: 11 Feb 2007
Posts: 15
Location: Chicago

PostPosted: Sun Feb 11, 2007 10:19 pm    Post subject: Some progress Reply with quote

Well, I found out that you CAN extract just the XML. First I simply exported the Xform document as a PDF and then exported the PDF form data as xml. But now I find that you can apply a submission to the form that saves the xml as a file. Cool.

One thing that troubles. The xml elements are saved in alphabetical order, rather than in the order that they appear in the document. If I have a title element I want first, and an author element I want second, the resulting xml always lists the author element first.

It appears that I'll have to fake it by calling the elements A-Title, B-Author, then doing a search and replace in Notepad or Oxygen. (Sure I could do an XSLT, but my company won't pay for any XML training, so find/change it will have to be.)
Back to top
View user's profile Send private message
paeon
General User
General User


Joined: 11 Feb 2007
Posts: 15
Location: Chicago

PostPosted: Sun Feb 25, 2007 6:17 pm    Post subject: Thanks to J David Eisenberg's How to article Reply with quote

I now know how to correctly export xml from an x-form. Course, you can't put tables in an x-form control, so I am pursuing another avenue.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group