really urgent

Dear Sir,

When i go to the TreeViewer in
(http://xml.apache.org/xerces-j/treeview.html), i find the number returned
by NodeList.getLength() is not the html tree number. I really need help on
this. I didn't sleep these days for this. For example, the tag <html> is
the root for the tree, generally, it has 2 children(<head> and <body>).
But Jtidy returns 1, not 2 as i need. This return comes from
NodeList.getLength(). Can i solve this number problem?

help me..

Mahor



On Tue, 2 Jan 2001, Gary L Peskin wrote:

> Chunbo Shao wrote:
> > 
> > Hello,
> > 
> > I am a master graduate student of computer science department of
> > UT at Arlington.
> > I am interested in Tidy and it is very nice.
> > I plan to use it in my master project. But I need to have the output from
> > it to be the datastrurcture of "JTree". Is it possible?
> > Would you please do me a favor to give me some hint about how to get to
> > that poinit using tidy package?
> > (I see you have some "Node" structure in tidy package.)
> > 
> > Looking forward to your kind reply.
> > Best wishes for you in the new year.
> > 
> > Major Shao
> 
> Hi, Major.  It is definitely possible to have the output from JTidy in a
> JTree although there is no support built into JTidy for this.  JTidy
> does have a somewhat complete DOM Level 1 implementation and you can
> navigate the DOM tree to build your JTree.  See the DOM specifications
> at <http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html>.
> 
> You might want to look at the Xerces TreeViewer Sample
> (http://xml.apache.org/xerces-j/treeview.html) for an example of viewing
> a DOM tree as a JTree.
> 
> HTH,
> Gary
> 

Received on Monday, 8 January 2001 03:43:35 UTC