Skip to content

Commit ac7c881

Browse files
committed
Fixes various typos in the comments.
1 parent cc76393 commit ac7c881

File tree

10 files changed

+17
-14
lines changed

10 files changed

+17
-14
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ pubspec.lock
88
.settings
99
.children
1010
.project
11+
.idea
1112
*.js
1213
*.js_
1314
*.js.map
1415
*.js.deps
15-
test/xml_playground.dart
16+
*.iml
17+
18+
test/xml_playground.dart

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ The above code returns a lazy iterator that recursively walks the XML document a
8888

8989
This prints _Growing a Language_ and _Learning XML_.
9090

91-
Similary, to compute the total price of all the books one could write the following expression:
91+
Similarly, to compute the total price of all the books one could write the following expression:
9292

9393
var total = document.findAllElements('book')
9494
.map((node) => double.parse(node.findElements('price').single.text))

lib/xml.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ part 'xml/builder.dart';
4141
part 'xml/grammar.dart';
4242
part 'xml/parser.dart';
4343

44-
final Parser _PARSER = new XmlParserDefintion().build();
44+
final Parser _PARSER = new XmlParserDefinition().build();
4545

4646
/**
4747
* Return an [XmlDocument] for the given `input` string, or throws an

lib/xml/builder.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
part of xml;
22

33
/**
4-
* A builder to programmatically create XML trees.
4+
* A builder to create XML trees with code.
55
*/
66
class XmlBuilder {
77

@@ -133,7 +133,7 @@ class XmlBuilder {
133133
/**
134134
* Binds a namespace [prefix] to the provided [uri]. The [prefix] can be
135135
* omitted to declare a default namespace. Throws an [ArgumentError] if
136-
* the [prefix] is invalid or conflicts with an existing delcaration.
136+
* the [prefix] is invalid or conflicts with an existing declaration.
137137
*/
138138
void namespace(String uri, [String prefix]) {
139139
if (prefix == _XMLNS || prefix == _XML) {

lib/xml/nodes/node.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ abstract class XmlNode extends Object with XmlVisitable, XmlWritable, XmlParent
2525
Iterable<XmlNode> get iterable => descendants;
2626

2727
/**
28-
* Return an interable of the nodes preceding the opening tag of this node
28+
* Return an iterable of the nodes preceding the opening tag of this node
2929
* in document order.
3030
*/
3131
Iterable<XmlNode> get preceding => new _XmlPrecedingIterable(this);
@@ -70,7 +70,7 @@ abstract class XmlNode extends Object with XmlVisitable, XmlWritable, XmlParent
7070
XmlNode get lastChild => children.isEmpty ? null : children.last;
7171

7272
/**
73-
* Return the text contents of this node and all its descendents.
73+
* Return the text contents of this node and all its descendants.
7474
*/
7575
String get text {
7676
return descendants

lib/xml/parser.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ part of xml;
33
/**
44
* XML parser that defines standard actions to the the XML tree.
55
*/
6-
class XmlParserDefintion extends XmlGrammarDefinition {
6+
class XmlParserDefinition extends XmlGrammarDefinition {
77

88
@override
99
XmlAttribute createAttribute(XmlName name, String text) => new XmlAttribute(name, text);

lib/xml/visitors/visitable.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ part of xml;
66
abstract class XmlVisitable {
77

88
/**
9-
* Dispatch the invokation depending on this type to the [visitor].
9+
* Dispatch the invocation depending on this type to the [visitor].
1010
*
1111
* Note that the return type of this method is intentionally left unspecified, so
1212
* that visitors can (but don't have to) pass return values.
1313
*/
1414
accept(XmlVisitor visitor);
1515

16-
}
16+
}

lib/xml/visitors/visitor.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ abstract class XmlVisitor {
6262
*/
6363
visitText(XmlText node);
6464

65-
}
65+
}

lib/xml/visitors/writer.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
part of xml;
22

33
/**
4-
* A visitor that writes XML nodes eactly as they were parsed.
4+
* A visitor that writes XML nodes exactly as they were parsed.
55
*/
66

77
class XmlWriter extends XmlVisitor {
@@ -173,4 +173,4 @@ class XmlPrettyWriter extends XmlWriter {
173173
}
174174
}
175175

176-
}
176+
}

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: xml
2-
version: 2.1.8
2+
version: 2.2.0
33
author: Lukas Renggli <[email protected]>
44
description: A lightweight library for parsing, traversing, querying and building XML documents.
55
homepage: http://github.com/renggli/dart-xml

0 commit comments

Comments
 (0)