Hi. I got 2 questions, but they're on the same project, and closly related. First, i'll outline the project. I'm trying to write a program that can download and extract 'data' from an HTML page on the web. My approach is to download the page, create a DOM of the page using JTIDY, then select out the items i want by using (pretty long) XPATH statements (in XSLT). So, the first problem is that i'm getting loads of rubbish output from the 'HEAD' section of the HTML DOM tree. I've tried <xsl utput method="...."/> and this seems to have no effect. Is it some kind of namespace problem (that namespace voodoo always seems to give me a headache....)??? The second problem is worse. I've got to be able to reference specific elements within the pages structure, so i'm using some code like: <xsl:template match="/html/body/center/table/tr....(etc.)"/>(etc.) to try and reference these 'areas' directly. I've hooked up my DOM tree to the DomEcho02 program from the java.sun.com site (cheeky!!?!), so that i can see a tree structure of the DOM i'm transforming. Even though i'm using this graphical tool to build my XPATH it seems to get to a certain point, and then just stops working. No error, just no output. Can you think of a reason why this approach may be failing??? If you know of another (better) way to write this program i'd love to hear, although i've already tried htmlparser from sourceforge and got completely and hoplessly lost with it! Many thanks Robin.
then just stops working. No error, just no output. Can you think of a reason why this approach may be failing??? its possible that the processor finds no content in the element that you are trying to select using the xPath. To debug such issues, I generally select an attribute (like the ID) at various levels of the XPath, just so I know how the runtime selection is proceeding. I have had such accidents also. Hope this helps. - madhav Ok, Now that I suggested something to you, could you please post the direct link to that DomEcho02 program from the java.sun.com site (cheeky!!?!), . Please don't tell me to goto the Sun website and search I never find anything in search, unless it is on this website. If you don't have the link handy, that's ok, don't sweat. Thanks. - m