Re: Parsing HTML

Ben Sinclair <[email protected]>
Newsgroups gmane.comp.java.enhydra.xmlc
Message-ID <[email protected]>

Actually I see now that the problem with the way I was doing it before 
isn't exactly because I have two <body> or other tags.

The following code should add my footer, not the best way to do it, but it 
partially works. The footer string contains my footer, and if I print it, I 
see that it's all there. When it gets added and I view the source of the 
produced page, it has chopped off the last few tags of the footer. Does 
anyone know why it might do that?

                 String footer = readFile(footerFile);
                 Node footerNode = html.getElementById("footer");
                 if (footerNode != null) {
                         ((LazyText) 
footerNode.getFirstChild()).setPreFormattedText(footer);
                 }



--
Ben Sinclair
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.