diff options
author | buraq <buraq@epfl.ch> | 2003-07-15 17:41:57 +0000 |
---|---|---|
committer | buraq <buraq@epfl.ch> | 2003-07-15 17:41:57 +0000 |
commit | 1277a5e94ee3e292d2088609f5440f7e1808ac03 (patch) | |
tree | a0e121e42b3bd2e3b12276faefad78c256b066b4 /sources | |
parent | bb98463dc10ea79afb81074ac1d9414fafd2088c (diff) | |
download | scala-1277a5e94ee3e292d2088609f5440f7e1808ac03.tar.gz scala-1277a5e94ee3e292d2088609f5440f7e1808ac03.tar.bz2 scala-1277a5e94ee3e292d2088609f5440f7e1808ac03.zip |
toString method works correct now
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scala/xml/Element.scala | 2 | ||||
-rw-r--r-- | sources/scala/xml/PCDATA.scala | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sources/scala/xml/Element.scala b/sources/scala/xml/Element.scala index ade1a4c2f9..04fb40bcb8 100644 --- a/sources/scala/xml/Element.scala +++ b/sources/scala/xml/Element.scala @@ -41,6 +41,8 @@ abstract class Element { if( attrib != null ) iterate( attrib.keys.elements ) else ""; } + override def toString() = getName.concat("(").concat(getChildren.toString().concat(")")); + /* def toXML : String = { val attribs = getAttribs; diff --git a/sources/scala/xml/PCDATA.scala b/sources/scala/xml/PCDATA.scala index fc1cfa7cca..120cbf4bf4 100644 --- a/sources/scala/xml/PCDATA.scala +++ b/sources/scala/xml/PCDATA.scala @@ -14,5 +14,7 @@ case class PCDATA( content:String ) extends Element { override def toXML:String = content; + override def toString() = "PCDATA("+content+")"; + } // PCDATA |