I have a really bad feeling about posting this here, but I’m kinda
stumped.
Ah, don’t say that. We’re pretty nice and almost never bite.
Feel free to ask future questions.
However, when I try to make use of the StringScanner from the core
API,
I know you’ve already got an answer, but this is the source of your
confusion and I thought I would see if I could clear it up for you.
Everything that is “Core Ruby” can be used without a require. Now
Ruby also ships with a “Standard Library”, which is a collection of
useful extra libraries you can also use (but with a require).
StringScanner is a Standard Library.
You can tell by looking at which link they are documented under, from
this page:
Thanks for the additional information. That makes things much clearer.
Though I greatly appreciate the help, I’ll try to keep the annoying
questions to a minimum
Does the brain good to do some thinking on ones own sometimes
I’ll be sure to call again should I hit another wall.
My current exercise is creating a script to scan through my systems log
files and autoblock the script kiddies who insist on trying their luck
with my SSH server.
Seemed like a nice, simple way to try out a few different ideas with
Ruby.
Might even post it when I’m done and see what you guys think.
I've to parse the open office documents and upload it to the
database in ruby on rails and in linux platform. I’ve not found any gem
to accomplish that. Now i got a idea of converting the open office
documents to XML format and then to parse the XML content to finish up
with my task.
Is it possible?
Is there standard ruby on rails libraries to do this task?
Guide me in achieving this...
Thanks for your kind reply. I’ve to create a open office.org document
containing the students details such as name,registernumber etc. Then
i’ve to parse these strings and map these details into the corresponding
table in the database. can you please guide me in accomplishing this
task.
On Mon, Jun 15, 2009 at 11:56 PM, Anandh
Kumar[email protected] wrote:
Hi everybody
   I’ve to parse the open office documents and upload it to the
database in ruby on rails and in linux platform. I’ve not found any gem
to accomplish that. Now i got a idea of converting the open office
documents to XML format and then to parse the XML content to finish up
with my task.
Isn’t OOo’s native format ODF, which is an XML format? So why do you
need to convert it to XML?
In simpler terms, I am looking to implement a functionality where the
user of my application would upload a ODT document. My application has
to read the ODT document and write the fields in to some database. I
guess i need a gem which helps me to read the odt document here, writing
it into database is not a problem.
On the other hand, If there is no gem to read the ODT file, then i am
looking for a gem which can help me convert the ODT file in to xml file.
I am comfortable parsing the xml file and go further.
Summary: What do i need to know?
Is there a gem which helps me to read ODT file? Similarly is there
any gem available in linux (platform independent) to read MS doc file. I
am expecting my user to upload his document files from any OS and my
server to be running in any platform. I guess i am clear.
Is there any gem which can convert the ODT files in to xml file?
Actually, to be frank, WE aren’t clear. What is it you want? What is
“The
database”? Mysql? PostGRE? SQL Server? Oracle? sqlite? We have no clue
unless you tell us. Also, we don’t know what your schema is, so unless
you
give us more specific information other than “I want to parse open
office
document and put it into the database”, nobody here can help you.
Ok, let me make it a bit easier for you. I want you to fill in the
following
blanks:
Hello,
I am trying to build an application that does ____________(please put in
something other than parsing an office document and put it into a
database).
The application requires us to commit the contents of a file into a
database. The file is in offfice format and contains data as follows
____________(put in sample data here). I need to take this file and
stick
its contents into a database. We are using
_______(mysql,oracle…whichever
one you are using).
I've to parse the open office documents and upload it to the
database in ruby on rails and in linux platform. I’ve not found any gem
to accomplish that. Now i got a idea of converting the open office
documents to XML format and then to parse the XML content to finish up
with my task.
Is it possible?
An OpenOffice document is a package of XML files zipped into a single
file. Change the .odt extension to .zip, unzip it, and you’ll see.