[page Using hoglet] [t1]Using hoglet[t1] [section] Using hoglet is easy. Although there are a number of ways it can be configured and used. hoglet can be configured via a XML configuration file and in that case you can use the [link xml-configured-processor.html]XML configured processor[link] to process your file/text. Alternatively you can configure hoglet in Java code directly. For example: [java] // Create a TextHandler that will handle the tag "pre". TextHandler th = new TextHandler (); Map handlers = new HashMap (); handlers.put ("pre", th); // Create the processor. Processor p = new Processor (handlers); // Now process a file using the standard hoglet parser delimiters. String output = p.process (new FileReader (pathToMyFile), ParserCharset.STANDARD); [java] [t3]Classpath[t3] Before using hoglet you should have the following jars (they can be found in the default installation) in your classpath: [l] [i]hoglet-0.2.jar[i] [i]3rd-party-jars/jdom-1.0.jar[i] [i]3rd-party-jars/gentlyWEB.jar[i] [l] [/section] [t2]Processing the Tags yourself[t2] [section] If you wish to process your input text/file yourself. Then you can get the processor to convert the text/file to tags via method: [javadoc hoglet,org.hoglet.Processor#convertToTags(java.io.Reader\, org.hoglet.ParserCharset),lastid=y /]. This will return a list of [javadoc hoglet,org.hoglet.data.Tag,lastid=y /] objects. [/section] [t2]Thread Safety[t2] [section] The [javadoc hoglet,org.hoglet.Processor,lastid=y /] class is thread safe. The [link core-tag-handlers.html]core tag handlers[link] are also thread safe. Be aware though that if you use your own handlers and they store any state then you will need to externally synchronize calls to the processor. [/section] [t2]This Site[t2] [section] Nearly all of this website (well the main information pages anyway) was written using hoglet markup. Needless to say the use of hoglet markup made writing (and maintaining) this site much easier than trying to do it in HTML or even with an editor. As such they provide some useful examples of using hoglet to actually DO something. Note: the standard hoglet delimiters were used. Click the links below for the source: [l] [i][link index.txt /][i] [i][link release-notes.txt /][i] [i][link using-hoglet.txt /][i] [i][link tags.txt /][i] [i][link tag-handlers.txt /][i] [i][link core-tag-handlers.txt /][i] [i][link text-handler.txt /][i] [i][link code-handler.txt /][i] [i][link link-handler.txt /][i] [i][link javadoc-handler.txt /][i] [i][link xml-handler.txt /][i] [i][link table-row-handler.txt /][i] [i][link xml-configured-processor.txt /][i] [i][link tools.txt /][i] [l] The site is built using the [javadoc hoglet,org.hoglet.tools.DirectoryProcessor /] [link tools.html]tool[link] with a [link data/tag-handlers.xml /] file as input to configure the handlers and provide the templates/tag definitions. [/section] [/page]