> Does the DOM built into IE handle <DT> elements
> properly (ie: no </dt>)? If so that would be great.
> Do you have any sample code to get me started? :)
Well, there are two ways you can do it. Either you can use the XML DOM (via
'new ActiveXObject( "MSXML.DOMDocument" );') - search for that in loader.js
for an example)
That won't handle tags that don't have a closing element however. The other
option would be to use the IE activeX object, whose class string escapes me
at the moment - load it with your HTML, then parse the DOM tree (via
document.elements)
As for example code, I can give you some pseudocode, but don't really have a
good way to test it right now, since I don't have a netscape bookmark file
laying around. I'll track some sample statements down, and paste them at
the bottom of this message.
> 1) maintaining the menu hierarchy structure - can we
> specify subcategories for dqsd? My yahoo bookmarks are
> up to 4 levels deep.
Hmmmm. I'm not really familiar with the menu stuff, at some point someone
was talking about categories/subcategories for a nested menu, but I don't
know if it ever got developed.
> 2) How do I decide what search name/alias to use. My
> yahoo bookmarks have ~1700 links organized in a tree
> structure up to 4 levels deep.
I'd have just given the URL as the alias, so as not to cause conflicts (of
course this doesn't work if you have the same URL bookmarked in different
spots of the tree)
> 3) How would I remember all my search names/aliases
> for 1700 searches?
I thought the point was to put it into the menu - I was really just
suggesting a simple way to put stuff into the menu. Of course I didn't
realize the scope of your bookmarks files (I think I have maybe 30 bookmarks
total)
> 4) How would adding 1700 searches impact the overall
> performance of dqsd?
Performance might be impacted, but I don't think seriously. I'd have to
look at the code again to be sure, of course, but 2000 additional
searches/aliases shouldn't take a noticable amount of time to deal with
(after the initial load/parsing)
Aliases are probably the more effective than searches for something like
this, but I have a suspicion that the menu doesn't have subcategory
cascading in it yet, and if it does, it's likely not going to work to 4
levels. (I'm not running the latest version here, so I can't be sure -
shame on me :)
Here's some sample code, as I promised.
The IE DOM stuff should be similar, you just have to figure out the proper
class string...
Note, I use MSXML3 at work, I don't know what version comes with IE5.5 by
default
var xmlDoc = new new ActiveXObject("Msxml2.DOMDocument");
var objNodeList;
var objSubNodeList;
var currNode;
var currSubNode;
xmlDoc.loadXML("<myRootNode><mySubNode><myBookmark>...");
objNodeList = xmlDoc.getElementsByTagName("mySubNode");
currNode = objNodeList.nextNode(); // get the first "<mySubNode>"
while (currNode != null) {
objSubNodeList = currNode.getElementsByTagName("myBookmark")
currSubNode = objSubNodeList.nextNode();
while (currSubNode != null) {
//Process the subnode - grab attributes and text
//currSubNode.attributes.getNamedItem("href").value
//currSubNode.text, etc.
currSubNode = objSubNodeList.nextNode();
}
currNode = objNodeList.nextNode();
}
That should parse things and let you maintain heirarchy info. It's not
clear how you want to procede from there.
Sorry it's not more IE DOM specific, I don't have any IE DOM code laying
around to look at. Worst case scenario, you can run the HTML through a
quick cleaning operation to make sure it's valid xml first.
This email has taken a long time to write - I apologize if someone else beat
me to it.
Greg
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
DQSD-Devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dqsd-devel