All Functions and Procedures

Name Unit Description
AttrNameToAttrID tidyobj Convert an attribute name to a TidyAttrID, returns TidyTag_UNKNOWN if the string is not a default HTML-4 attribute name. Note that the match is NOT case-sensitive.
EntsToChars tidyobj EntsToChars() tries to convert most HTML entities to their respective ASCII characters.

This function modifies the input string in-place, it does not re-allocate anything.

EntsToChars tidyobj Same as the EntsToChars(src:pChar) procedure, overloaded to use AnsiString instead of pChar.
FindAncestor tidyobj FindAncestor() searches the parental hierarchy of the specified node for an element of the type specified in the TAG argument that carries the attribute specified by the ATTR argument. To ignore the either the TAG or ATTR criteria, pass TidyTag_UKNOWN or TidyAttr_UKNOWN, respectively. Returns NIL if it can't find a higher level container with the matching criteria.

This might be useful for example if you want to know if an image is "hot" :

      if tidyNodeIsIMG(some_node)
      and ( FindAncestor(some_node, TidyTag_A, TidyAttr_HREF) <> nil )
      then ... 

Or perhaps if you want to know if a node contains preformatted text:

      if tidyNodeHasText(some_doc, some_node)
      and ( FindAncestor(some_node, TidyTag_PRE, TidyAttr_UNKNOWN) <> nil )
      then ... 

Or maybe you want to know if an element inherits any STYLE attributes:

      if ( FindAncestor(some_node, TidyTag_UNKNOWN, TidyAttr_STYLE) <> nil )
      then ... 

 

FindTag tidyobj FindTag() scans the haystack for the next tag that matches needle (case-insensitive match) The needle must start with < or </ followed by a tag name. The tag name should start with an alpha char, and be null-terminated with no trailing whitespace. Returns a pointer into the haystack where the match is found, or NIL otherwise.

Note that this function is implemented by TidyPas, not by the TidyLib library.

ForEachAttr tidyobj ForEachAttr() will call your tAttrCallback once for each attribute of the node specified in the given tNodeInfo.

The data parameter is an arbitrary pointer that will be passed to the callback as the user_data argument.

ForEachNode tidyobj ForEachNode() will iterate through the start node and any proceeding siblings.

Your tNodeCallback will be called once for each node at the same level as start, setting the fields of the tNodeInfo object to reflect the current TidyNode.

To recurse into the child nodes of a node, you must call ForEachNode() again from within your callback, e.g.

  procedure MyNodeCallback(const info:tNodeInfo; user_data:pointer);
  begin
    ForEachNode(info.doc, info.child, @MyNodeCallback, user_data);
  end; 
 

Setting info.Proceed to False from within your callback will cause ForEachNode to cancel further iteration.

ForEachTag tidyobj ForEachTag() will traverse ALL elements of the document (including children), starting at the specified pTidyNode.

Your callback will be called once for each node that matches the specified TAG.

If the TAG argument is set to TidyTag_UNKNOWN, all tags will match.

ForEachTagInTags tidyobj ForEachTagInTags() is basically the same as the ForEachTag() procedure, except that the callback is called for any node whose tag is a member of the tags argument.
ForEachTagStr tidyobj ForEachTagStr will call your tForEachTagStrCallback once for each markup tag it finds in source.

Note that this procedure is implemented by TidyPas, not by the TidyLib library.

FormatTidyReportMessage tidyobj Convenience function to format the information passed by the TidyReport filter callback ( or TTidy OnReport event) into a single string.
RowColToOffset tidyobj RowColToOffset() returns a pointer into SRC at the location specified by ROW and COL. The LineBreak argument specifies the type of line breaks to expect in SRC, and should be one of #10, #13#10, or #13 ( for unix, dos, or mac, respectively )

ROW and COL are both one-based, that is, the first chararcter in SRC is (1,1)

Returns NIL if the calculated offset of ROW and COL is out-of-range ( past the end of SRC )

Note that this function is implemented by TidyPas, not by the TidyLib library.

TagNameToTagID tidyobj Convert a tag name to a TidyTagID, returns TidyTag_UNKNOWN if the string is not a default HTML-4 tag name. Note that the match is NOT case-sensitive.
tidyBufLineEnd tidyobj Appends the specified EOL to the buffer, specify one of: TidyLF for unix, TidyCRLF for ms-dos/windows, or TidyCR for macintosh.

Generated by PasDoc 0.10.0 on 2005-12-23 21:07:56

Support This Project  
Get CurlPas and TidyPas at SourceForge.net. Fast, secure and Free Open Source software downloads