Re: [Htmlparser-user] trying to get the params from a flash object
Brought to you by:
derrickoswald
From: Derrick O. <der...@ro...> - 2007-11-16 22:18:36
|
I think it's case sensitive - upper case that is. Try: private static final String[] mIds = new String[] {"PARAM"}; and: String [] tagsToBeFound = {"PARAM"}; ----- Original Message ---- From: Randy Paries <rtp...@gm...> To: htm...@li... Sent: Friday, November 16, 2007 4:21:17 PM Subject: [Htmlparser-user] trying to get the params from a flash object 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> ==================================================================================================== ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Htmlparser-user mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlparser-user |