HP3000-L Archives

June 2000, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Peter Chong <[log in to unmask]>
Reply To:
Peter Chong <[log in to unmask]>
Date:
Mon, 5 Jun 2000 09:29:13 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (98 lines)
Hi, Mark

Did I mentioned, I wrote IMAGE to XML converter?
Actually, It use ODBC technology(any DB) and run with MS Office/Access.

The ODBC to XML Wizard, It Read Image/File from eHP3k(via ODBC/32)
and generates XML and XSL(simple view) files in your PC, Just FTP ing
back into eHP3K Web server, Free demo is available, and e-mail to 
[log in to unmask] 

Hope it help

Peter C.
>>> Mark Wonsil <[log in to unmask]> 06/04/00 08:49PM >>>
(Sorry I'm late, was out of town last week...)

This is a great thread.  As David, Doug, Lars, Wirt, Michael, Benji, et. al.
show, it is really easy to bring an HTML file from an HTTP server into a
variable with a lot of different languages.  Now, what can I do with it?  Do
I want to parse through a ton of HTML to find the data I want?  (Let's
see...it's in the 5th <td> in the 3rd <tr> in the 2nd <table>) What if the
Webmaster gets bored and redesigns the page?  What if she starts to use
<FRAMESETS>?  What if the company changes its name to Agilent and the whole
site looks different?  Arghhhhh!  Wouldn't it be nice if you didn't have to
winnow the data from the formatting chafe?  There is a way you know. ;-)
(Here he goes again...)  Of course, you could keep the data separate from
the presentation and mark up the data with meaningful tags.  That would be
helpful.  In fact, that would be..well..XML.

But you say, "Wonsil, that's just great for those Java, PHP, Perl, Python,
C++ and other non-Cobol/Fortran/Basic folks out there - but I don't have an
XML parser and there's enough string manipulation going on there to make a
fretless bass player queasy."  I say, "You can read and write records.
Can't you?"  And you say, "Of course I can!  I'm a @#$! Cobol/Fortran/Basic
programmer.  That's all I do!  (That and bash 4GL products...)"

Well, what if we take a marked-up file and change it to a record format.
Instead of:

<diskusage><drive><ldev>1</ldev><total>4500000</total><free>234000</free></d
rive></diskusage>

we write:

(diskuage
(drive
(ldev
~1
)ldev
(total
~4500000
)total
(free
~234000
)free
)drive
)diskusage

Now the first column tells me if I have a starting tag '(', a closing tag
')' or data '~'.  Now class, can anyone find the 88 clause in this picture?
(Some Python extremist came up with this format.  For more info see
http://www.pyxie.org)  So, how do I get my XML file to/from this format?
Well, here's where some of those "Oh-Oh" languages could help.  It would be
fairly straight forward to write a Java servlet that took a URL as input,
retrieved the file and used a SAX parser to convert it into this 'Pyxie'
format then pass the result to your program using sockets.  Great!  I can
read XML documents in Cobol/Fortran/Basic.

Now wouldn't it be really cool if I could send XML documents too?  Let's say
we take the great advice from our friend at QSS and write a little server
(using their toolkit or roll your own) that concentrates on serving data.
We can have a pool of these servers running each with a socket connection to
a Java servlet.  Now we are letting the web server handle requests and the
application programmer can ignore that whole issue.  A request comes in:
http://my3k.org/mpeixml?cmd=diskusage.  The mpeixml servlet sees a request
for diskusage.  It makes a request from one of the available servers in the
pool and the server program sends a file like the example above back to the
servlet.  The servlet converts it to XML, calculates content-length and
sends the response back to a Wirt's Visual Basic program.  The servlet could
also apply a style sheet and make an HTML file for a web browser.  Wait!
The system administrator is really anal, so the style sheet formats a WML
file for his cell phone.  Hey!  There's also that daily report sent to the
head of I.T. on the state of the system, so a link in the Word file pulls in
the data for an embedded chart.  Also, all of those new scripting languages
for the web can read your XML files too.  Woo! Hoo!

Getting back to reading XML documents, there is a special case.  Sometimes
all we want is records.  If I make an SQL request, on an Oracle database for
example, the resulting XML file will have an element surrounding each row
(<row>..</row> maybe) and the fields will be nested in this element.  One
could then read the fields quite easily.  For a further discussion, see
www.xml.com and search for RAX.  Rax is the Record Oriented API for XML.

Sorry I went long, but I hope it sparks some ideas out there.

Mark Wonsil
4M Enterprises, Inc.

ATOM RSS1 RSS2