summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBurak Emir <emir@epfl.ch>2006-03-14 16:48:49 +0000
committerBurak Emir <emir@epfl.ch>2006-03-14 16:48:49 +0000
commit8b4c6ca1071a601a001b22b0ac6acc93f2d3dc4d (patch)
treec152588ed21b2ed2bce595d5e119edab5d07f291 /src
parent9765bb08ad70a39b7afa62fc47a283d0b98bf128 (diff)
downloadscala-8b4c6ca1071a601a001b22b0ac6acc93f2d3dc4d.tar.gz
scala-8b4c6ca1071a601a001b22b0ac6acc93f2d3dc4d.tar.bz2
scala-8b4c6ca1071a601a001b22b0ac6acc93f2d3dc4d.zip
removed asList, change \
Diffstat (limited to 'src')
-rw-r--r--src/library/scala/xml/NodeSeq.scala8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/library/scala/xml/NodeSeq.scala b/src/library/scala/xml/NodeSeq.scala
index 4152673942..6a43e269ad 100644
--- a/src/library/scala/xml/NodeSeq.scala
+++ b/src/library/scala/xml/NodeSeq.scala
@@ -46,7 +46,7 @@ abstract class NodeSeq extends Seq[Node] {
var res: NodeSeq = NodeSeq.Empty;
that match {
case "_" =>
- res = for( val x <- this; val y <- x.child: NodeSeq) yield { y }
+ res = for( val x <- this; val y <- x.child; y.typeTag$ != -1) yield { y }
case _ if (that.charAt(0) == '@') && (this.length == 1) =>
val k = that.substring(1);
@@ -88,13 +88,11 @@ abstract class NodeSeq extends Seq[Node] {
(s:String,x:Node) => s + x.toString()
}
- def asList = elements.toList;
-
def map(f: Node => NodeSeq): NodeSeq = flatMap(f)
- def flatMap(f:Node => NodeSeq): NodeSeq = { val y = asList flatMap { x => f(x).asList }; y }
+ def flatMap(f:Node => NodeSeq): NodeSeq = { val y = toList flatMap { x => f(x).toList }; y }
- def filter(f:Node => Boolean): NodeSeq = { val x = asList filter f; x }
+ def filter(f:Node => Boolean): NodeSeq = { val x = toList filter f; x }
def text: String = {
val sb = new StringBuffer();