[Htmlparser-user] trying to get the params from a flash object
Brought to you by:
derrickoswald
From: Randy P. <rtp...@gm...> - 2007-11-16 21:21:21
|
from an html page, i am trying to get the params name and value pairs the html snippet below:: So i can find the ObjectTag. when i do a NodeList flashchildren = ObjTag.getChildren(); all the flashchildren are of a type of Tag. So i though i would make my own tag. public class FlashParams extends CompositeTag{ private static final String[] mIds = new String[] {"param"}; //bunch of other stuff deleted for this email } then i wrote this litte test function; Parser parser = new Parser(); parser.setInputHTML(ObjTag.toHtml()); PrototypicalNodeFactory factory = new PrototypicalNodeFactory (); factory.registerTag (new FlashParams()); parser.setNodeFactory (factory); String [] tagsToBeFound = {"param"}; TagFindingVisitor visitor = new TagFindingVisitor (tagsToBeFound); parser.visitAllNodesWith (visitor); Node[] fpp = visitor.getTags(0); but all the fpp nodes are type "Tag" Any suggestions what i may be missing or doing wrong? thanks ==================================================================================================== <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="SimpleGallery_AlbumSelect" name="SimpleGallery_AlbumSelect" width="435" height="400" align="top"> <param name="play" value="false" /> <param name="loop" value="false" /> <param name="menu" value="false" /> <param name="quality" value="high" /> <param name="wmode" value="transparent" /> <param name="flashvars" value="HTMLDirectory=kam&node=http://192.168.10.50:8080&path=/k/kam/" /> <embed type="application/x-shockwave-flash" play="false" loop="false" menu="false" quality="high" wmode="transparent" flashvars="HTMLDirectory=kam&node=http://192.168.10.50:8080&path=/k/kam/" id="SimpleGallery_AlbumSelect" name="SimpleGallery_AlbumSelect" src="/flashgadgets/SimpleGallery.swf" align="top" bgcolor="#333333" width="435" height="400"></embed></object> ==================================================================================================== |