WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

DOM

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

DOM Extender

 Keywords: PARSE PARSING HTML XML DOM  

Graphical Dynamics is making available for download our WIL extender for parsing HTML/XML files.

http://www.graphicaldynamics.com/wxdom/wxdom44i.zip

As always, any bug reports will be appreciated:http://www.graphicaldynamics.com/techforum/viewforum.php?f=9

The wxdom44i.dll extender was originally developed for use in AutoIntern 2.0, our job scheduler app. In fact several of our sample scripts use it. But now we're making it available for standalone use by any WinBatch script as well.

Our DOM extender lets you read an HTML or XML file, search for elements by various criteria, change data, move/delete/insert elements, etc.

The API is loosely based on the standard DOM model, but was designed to be simpler to use within the WIL-programming paradigm. The DOM extender is also more forgiving of coding errors in XML files than, for example, Microsoft's MSMXL parser.

The zip file comes with the DLL, a CHM help file, and three sample scripts:

DataFilter - Demonstrates parsing XML, finding elements, deleting & inserting elements.

RSSViewer - Downloads XML files (RSS feeds in one of several RSS formats) from blogs, picks out the stories from the last 48 hours, and builds up an HTML file of links.

Search Engine Rank analyzer - You specify a keyword & URL, and this searches four different search engines for that keyword, parses the resulting HTML files, and determines the result where that URL shows up for it.

I'm curious to know if you think this is easier to use/more useful than the other parsers out there. We're going to continue supporting this, of course, since we use it in our product, but is it worth it to you to see it continue to be supported?

Enjoy!
Jenny Palonus
GDI

=======================================

Version 10010 Oct 22, 2007
	FIX: Removed the 128-character limit on pathnames that the extender would recognize.

Version 10011 Oct 29, 2007
	IMPROVED: The search functions that take a tagname or attribute name now accept
	wildcarded names using "*" & "?". (DOMGet1stChild, DOMGetElementsByTagname, 
	DOMGetAttr, etc.)

Version 10012 Nov 06, 2007
	NEW: Namespace functions. These start with "NS". (Most of them are still untested
	& these are marked as such in the help file.)
	
	FIX: If you called a search function and the search string was wildcarded, the
	functions would match a blank item as well. (DOMGetLinksByHRef would match an
	empty href value, DOMGetElementsByTagname would match a tag with no name, etc.)
	
	FIX: DOMGetLinksByHRef was performing a case-sensitive search, which is 
	contrary to the documentation.

Version 10013 Nov 08, 2007
	IMPROVED: The namespace functions have all been alpha-tested. We're throwing them
	out to the tender mercies of all you beta-testers. Please report any bugs to
	the AutoIntern tech support board: http://www.graphicaldynamics.com/forum

Version 10014 Nov 12, 2007
   NEW: Added the NSSetPrefixes function. This function does a wholesale rename of
   namespace prefixes within a specified node and its descendants.

   IMPROVED: The tagname parameter in DOMGetElementsByTagname now defaults to "*".
   This will return all descendant elements of the specified node, regardless of
   their tagnames.

   FIX: If you called a search function, it would always act as if you were passing 
   it a wildcarded expression ending in "*". (DOMGetElementsByTagname(hNode,"t") 
   would find <table>, <tr>, <td>, etc.)

   FIX: If you called DOMGetElementsByTagname and specified "*" for the tagname, in
   addition to finding elements it would also match the document root, processing 
   instructions, and comments.

   FIX: The interior text of CDATA sections wasn't being recorded correctly.

Version 10015 Nov 13, 2007
   NEW: DOMGetNodesByType. This is similar to DOMGetElementsByTagname, but lets you 
   get all instances of nodes of a specific type or of any type.

   NEW: DOMGetNodeData, DOMSetNodeData. These let you get/set the text of comments,
   processing instructins, CDATA or other sections, and plaintext nodes.

   FIXED: DOMGetOuterHTML wasn't reproducing CDATA sections correctly.

Version 10016 Nov 16, 2007
   IMPROVED: When you specify a node by its node path, you can have embedded blanks
   between parts of the path or between tagnames and the [indexes] afterwards.

   FIXED: If you specified an incorrect tagname in a node path, it wouldn't 
   necessarily return a node handle of 0 like it should.

Version 10027 May 30, 2008

   NEW: DOMGetDocEncoding, DOMSetDocEncoding. these let you get/set a document's
   character encoding, the byte order (if using 16-bit characters), and whether or
   not to include a byte-order mark when writing out the file.

   IMPROVED: Better handling of 16-bit XML files in both byte orders, better reading 
   of the byte-order marks, and better determination of the character size & encoding
   if there is no BOM.

Version 10028 Aug 20, 2008

   NEW: DOMGetVersion. This returns the extender's integer version number. For 
   example, 10028.

   FIX: If you created an XML/HTML file from scratch without first reading it in via
   DOMParseFile, and you didn't also call DOMSetDocEncoding, when you later called 
   DOMWriteFile it would GP fault.

Version 10029 Sep 12, 2009

  FIX: DOMGetElementsByAttrValue (and DOMGetXByY generally except for 
  DOMGetCommentsByText) weren't returning all the matching nodes.

=======================================

Functions:

DOMAttrItemize
DOMChildElementItemize
DOMChildNodeItemize
DOMClose
DOMCopyNode
DOMCreateNode
DOMDeleteAttr
DOMDeleteChild
DOMDeleteNode
DOMGet1stChild
DOMGetAttr
DOMGetComment
DOMGetCommentsByText
DOMGetDocEncoding
DOMGetElementByID
DOMGetElementsByClass
DOMGetElementsByID
DOMGetElementsByName
DOMGetElementsByTagname
DOMGetImagesBySrc
DOMGetInnerHTML
DOMGetInnerText
DOMGetLastChild
DOMGetLinksByHRef
DOMGetLinksByText
DOMGetNextChild
DOMGetNextSibling
DOMGetNode
DOMGetNodeData
DOMGetNodeType
DOMGetNodesByType
DOMGetOuterHTML
DOMGetParent
DOMGetPrevChild
DOMGetPrevSibling
DOMGetTagname
DOMGetTop
DOMInsertAfter
DOMInsertBefore
DOMInsertChild
DOMParseFile
DOMParseString
DOMRemoveNode
DOMSetAttr
DOMSetComment
DOMSetDocEncoding
DOMSetInnerHTML
DOMSetNodeData
DOMSetNodeType
DOMSetOuterHTML
DOMSetTagname
DOMWriteFile
NSSetPrefixes

Constants:

@DOMDocAuto
@DOMDocUnk
@DOMDocHTML
@DOMDocXML

@DOMNodeUnk
@DOMNodeDocument
@DOMNodePI
@DOMNodeSection
@DOMNodeComment
@DOMNodeTag
@DOMNodePlaintext








Article ID:   W16868
File Created: 2008:09:19:13:46:30
Last Updated: 2008:09:19:13:46:30