
pomutil.XMLUtil.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pom-util Show documentation
Show all versions of pom-util Show documentation
A library for reading Maven POM files.
//
// pom-util - a Scala library for reading Maven POM files
// http://github.com/samskivert/pom-util/blob/master/LICENSE
package pomutil
import scala.xml.Node
/**
* Some XML utilities.
*/
object XMLUtil {
/** Obtains the text of the (first instance of the) specified child of the supplied node, if it
* exists. Trims whitespace along the way. */
def text (node :Node, child :String) :Option[String] =
(node \ child).headOption map(_.text.trim)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy