diff options
Diffstat (limited to 'sources/scala/xml/Utility.scala')
-rw-r--r-- | sources/scala/xml/Utility.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sources/scala/xml/Utility.scala b/sources/scala/xml/Utility.scala index 0303e0350a..e0a63b76e6 100644 --- a/sources/scala/xml/Utility.scala +++ b/sources/scala/xml/Utility.scala @@ -26,17 +26,17 @@ object Utility { /** serializes an instance of Node to a string that contains well-formed XML **/ def toXML( n:Node ):String = n match { case Text( t ) => escape( t ); - case _ => + case x:AttributedNode => val s = new StringBuffer(); s.append("<"); - s.append( n.label ); - if( null != n.attributes ) { - s.append( attr2xml( n.attributes.elements ) );{} + s.append( x.label ); + if( null != x.attributes ) { + s.append( attr2xml( x.attributes.elements ) );{} } s.append(">"); - s.append( toXML( n.children.elements ) ); + s.append( toXML( x.children.elements ) ); s.append("</"); - s.append( n.label ); + s.append( x.label ); s.append(">"); s.toString() } |