correct some errors and omissions in stdlib doc comments

This commit is contained in:
Dmitry Jemerov
2015-05-28 14:38:36 +02:00
parent fa5aa664b5
commit 8f0f02fc59
8 changed files with 75 additions and 47 deletions
+5 -5
View File
@@ -123,10 +123,10 @@ public val Node.innerHTML: String
public val NodeList.outerHTML: String
get() = toList().map { it.innerHTML }.join("")
/** Returns an [[Iterator]] of all the next [[Element]] siblings */
/** Returns an [Iterator] of all the next [Element] siblings */
public fun Node.nextElements(): List<Element> = nextSiblings().filterIsInstance(javaClass<Element>())
/** Returns an [[Iterator]] of all the previous [[Element]] siblings */
/** Returns an [Iterator] of all the previous [Element] siblings */
public fun Node.previousElements(): List<Element> = previousSiblings().filterIsInstance(javaClass<Element>())
@@ -157,14 +157,14 @@ public fun createDocument(builderFactory: DocumentBuilderFactory = defaultDocume
}
/**
* Returns the default [[DocumentBuilderFactory]]
* Returns the default [DocumentBuilderFactory]
*/
public fun defaultDocumentBuilderFactory(): DocumentBuilderFactory {
return DocumentBuilderFactory.newInstance()!!
}
/**
* Returns the default [[DocumentBuilder]]
* Returns the default [DocumentBuilder]
*/
public fun defaultDocumentBuilder(builderFactory: DocumentBuilderFactory = defaultDocumentBuilderFactory()): DocumentBuilder {
return builderFactory.newDocumentBuilder()
@@ -219,7 +219,7 @@ public fun Node.toXmlString(xmlDeclaration: Boolean): String {
return writer.toString()
}
/** Converts the node to an XML String and writes it to the given [[Writer]] */
/** Converts the node to an XML String and writes it to the given [Writer] */
public fun Node.writeXmlString(writer: Writer, xmlDeclaration: Boolean): Unit {
val transformer = createTransformer()
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, if (xmlDeclaration) "no" else "yes")