Skip to content

Commit

Permalink
drive-by: fix some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
ymo-sci committed Dec 9, 2024
1 parent 12cc6fa commit 68fa48d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/sirius/kernel/xml/XMLReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
import java.util.function.Function;

/**
* A combination of DOM and SAX parser which permits to parse very large XML files while conveniently handling sub tree
* A combination of DOM and SAX parser which permits to parse very large XML files while conveniently handling subtree
* using a DOM and xpath api.
* <p>
* Used SAX to parse a given XML file. A set of {@link NodeHandler} objects can be given, which get notified if
* a sub-tree below a given tag was parsed. This sub-tree is available as DOM and can conveniently be processed
* a subtree below a given tag was parsed. This subtree is available as DOM and can conveniently be processed
* using xpath.
*/
public class XMLReader extends DefaultHandler {
Expand All @@ -57,7 +57,7 @@ public class XMLReader extends DefaultHandler {
/**
* Creates a new XMLReader.
* <p>
* Use {@link #addHandler(String, NodeHandler)} tobind handlers to tags and then call one of the <tt>parse</tt>
* Use {@link #addHandler(String, NodeHandler)} to bind handlers to tags and then call one of the <tt>parse</tt>
* methods to process the XML file.
* <p>
* To interrupt processing use {@link TaskContext#cancel()}.
Expand Down Expand Up @@ -136,15 +136,15 @@ public void startElement(String uri, String localName, String name, Attributes a
* Registers a new handler for a qualified name of a node.
* <p>
* Note that this can be either the node name itself or it can be the path to the node separated by
* "/". Therefore &lt;foo&gt;&lt;bar&gt; would be matched by <tt>bar</tt> and by <tt>foo/bar</tt>, where
* "/". Therefore, &lt;foo&gt;&lt;bar&gt; would be matched by <tt>bar</tt> and by <tt>foo/bar</tt>, where
* the path always has precedence over the single node name.
* <p>
* Handlers are invoked after the complete node was read. Namespaces are ignored for now which eases
* the processing a lot (especially for xpath related tasks). Namespaces however
* could be easily added by replacing String with QName here.
*
* @param name the qualified name of the tag which should be parsed and processed
* @param handler the NodeHandler used to process the parsed DOM sub-tree
* @param handler the NodeHandler used to process the parsed DOM subtree
*/
public void addHandler(String name, NodeHandler handler) {
handlers.put(name, handler);
Expand All @@ -162,7 +162,7 @@ public void parse(InputStream stream) throws IOException {
}

/**
* Used to handle the an abort via {@link TaskContext}
* Used to handle an abort via {@link TaskContext}
*/
static class UserInterruptException extends RuntimeException {

Expand Down

0 comments on commit 68fa48d

Please sign in to comment.