473,657 Members | 2,355 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"toXHTML()" , where's the XML?

I'm looking at
<http://xmlserv.com/API/com/xmlserv/app/shared/SODocument.html #toXHTML(javax. xml.transform.S ource)>
and <http://jtidy.sourcefor ge.net/> in trying to get some XML extracted
from XML. I'm reading two "for dummies" books, "XHTML for dummies" and
"XML for dummies", they're not the most current but are sufficient, I'm
sure.

I have some Java code which, using JTidy, reads in a URL and kicks out
the JTidy parsed file. The code is at <http://thufir.lecktron ix.net/>,
click on "files" and "JTidy".

Where's the XML? I'm looking for either a "toXHTML" or "toXML" method
(function/routine/sub-program) in JTidy, but can't find it.

At this point I'm staying away from Necko
<http://people.apache.o rg/~andyc/neko/doc/html/> and Xerces
<http://xml.apache.org/xerces2-j/> simply because I have something with
JTidy, although I might switch to Necko later.

Anyhow, in the jar (which can be downloaded from
<http://thufir.lecktron ix.net/> JTidy does parse a URL
(<http://www.yahoo.com/> is hard-coded in) and generates out.html.
Where's the XML, embedded within the XHTML?
thanks,

Thufir

Aug 8 '05 #1
5 1372


ha**********@gm ail.com wrote:

Anyhow, in the jar (which can be downloaded from
<http://thufir.lecktron ix.net/> JTidy does parse a URL
(<http://www.yahoo.com/> is hard-coded in) and generates out.html.
Where's the XML, embedded within the XHTML?


XHTML is XML so I am not sure what you are looking for, presumably the
out.html is JTidy's attempt to create XHTML from http://www.yahoo.com/
for you.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Aug 8 '05 #2
Martin Honnen wrote:
ha**********@gm ail.com wrote:

Anyhow, in the jar (which can be downloaded from
<http://thufir.lecktron ix.net/> JTidy does parse a URL
(<http://www.yahoo.com/> is hard-coded in) and generates out.html.
Where's the XML, embedded within the XHTML?


XHTML is XML so I am not sure what you are looking for, presumably the
out.html is JTidy's attempt to create XHTML from http://www.yahoo.com/
for you.
--

Martin Honnen
http://JavaScript.FAQTs.com/


That was my understanding, that "out.html" is XHTML; XHTML being a
super-set of XML. Having said that, I now realize that I've asked the
wrong question, or at least phrased it wrong, sorry.

I want to insert data from "out.html" into a database, such as
Hibernate <http://www.hibernate.o rg/> or Cocoon
<http://cocoon.apache.o rg/>.

To do that, I understand that I must first "transform" XML with XSLT,
somehow. I think I need more information about that process in order
to ask useful questions.

So, perhaps better questions are:

What sort of "output" am I looking for from an XSLT transform (in order
to do a database insert)?

Do I need to do the XSLT myself, or can that be done from a database?

Thanks,

Thufir

Aug 8 '05 #3


ha**********@gm ail.com wrote:

That was my understanding, that "out.html" is XHTML; XHTML being a
super-set of XML.
XHTML is an XML application meaning that any XHTML document is a
well-formed XML document. But XHTML is not a super-set of XML.

What sort of "output" am I looking for from an XSLT transform (in order
to do a database insert)?
No idea really, standard XSLT output methods are xml, html, and text so
you could use an XSLT stylesheet to process an XHTML document and
transform it to XML or HTML or plain text.
Not sure why you think XSLT helps with a data base insert, unless you
have a data base that stores XML natively/directly, or unless you have a
certain XSLT extension that allows RDBMS access.
Do I need to do the XSLT myself, or can that be done from a database?


I am not familiar with Cocoon or Hibernate, unless someone else shows up
here with expertise on those you are probably better off asking in one
of the dedicated mailing lists or forums offered on the web sites of the
products.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Aug 9 '05 #4
Martin Honnen wrote:
....
No idea really, standard XSLT output methods are xml, html, and text so
you could use an XSLT stylesheet to process an XHTML document and
transform it to XML or HTML or plain text.
This is what I want to do, thanks. I'll look further into that.
Not sure why you think XSLT helps with a data base insert, unless you
have a data base that stores XML natively/directly, or unless you have a
certain XSLT extension that allows RDBMS access.
I was browsing the bookstore and came across "Hibernate: A Developer's
notebook", <http://www.oreilly.com/catalog/hibernate/>.

Perhaps I misunderstood. I'm trying to get XML from XHTML with XSLT.
As I read it, Hibernate and Cocoon will take XML as data. Therefore, I
need to get some XML from the XHTML, then feed the XML to the RBDMS.

.... I am not familiar with Cocoon or Hibernate, unless someone else shows up
here with expertise on those you are probably better off asking in one
of the dedicated mailing lists or forums offered on the web sites of the
products.

....

Ok, will do.

Thanks,

Thufir

Aug 9 '05 #5
Martin Honnen wrote:
....
I am not familiar with Cocoon or Hibernate, unless someone else shows up
here with expertise on those you are probably better off asking in one
of the dedicated mailing lists or forums offered on the web sites of the
products.

....

"Use Cocoon to Create a Well-Formed View of a Web Page, Then Scrape It
for Data"
<http://hacks.oreilly.c om/pub/h/2125>

Now to install Cocoon...
-Thufir

Aug 15 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
6116
by: david johnson | last post by:
I wrote an app thats alot like a text editor. It produces files of a User Defined type. I want the user to be able to dble click on a saved file that was made by my program and have my program come up and read the file.. I can write the code to handle the file but where does Windows store the File Path of a file that was just dble clicked by user. I've tested registry, and searched windows files. Any Ideas?
5
5778
by: Interzoner | last post by:
I am new at Java.. I installed j2sdk-1.4.2-nb-3.5-bin-windows on a Windows 2000 machine I can't find a "Javac"file......
3
1348
by: Lad | last post by:
Hi, I would like to make in my web application a similar navigation like Google uses, I mean at the bottom of each page there are numbers of returned pages after you search query. Has anyone tried that? Is there an algorithm for that? I do not want to re-invent the wheel. Thank you for help La.
2
954
by: guy | last post by:
i am working on a different pc to usual with vb2005 pro. whenever i load up a solution (by using open, or doubleclicking the solution file the project loads but the solution does not appear in SolutionExplorer and there are no 'solution' related options on the file menu - not even greyed out so i cant add a new project , set build options, explicitly create a blank solution... this must be a configuration thing, but where?
4
2261
by: Terry | last post by:
Hi, I am both new to .Net (coming from VB6 and DAO) and to this news group. I am trying to convert some code from VB6 that uses a "record set" to help the user locate a specific record. As the user types into a text box, the grid position changes. example: rs.index = "CompanyName" .. ..
4
11955
by: nesr235 | last post by:
I can't beleive that Microsoft would create the whole Sitemap XML datasource process but not have a TARGET tag. What am I missing? The only place I saw the target tag was at the treeview level. Please tell me that something this basic is at the siteMapNode level and not the Treeview level? Does anyone have a work around for this Design Flaw?
5
1924
by: talktozee | last post by:
Hello, everyone! Here's are the basics: 1. The query looks at all positions that are active and haven't been filled. 2. It then has to look at every single position and determine three things: Does the person running the query (via an ASP page) have certain rights? a. Recruit rights b. Enlist rights c. Take rights
3
3885
by: jfarrell | last post by:
Hi there, Im attempting to publish my site to local then copy files to the web server. The only option there seems to be in VWDE is to build/copy the site...where is the Publish website option ? any ideas thanks
2
1796
by: Idrisu | last post by:
Hello, i have this constellation on tables in my database: Table A id|content Table B table_a_id|table_c_id
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8606
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6169
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4159
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2732
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1959
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1622
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.