Gömülü Scala ile oluşturulmuş bazı XML'lerim var, ancak oluşturulan XML'yi ayrı satırlara koymuyor.Scala'da biçimlendirilmiş XML oluşturma
Şu anda, böyle
<book id="0">
<author>Gambardella, Matthew</author><publish_date>Sun Oct 01 00:00:00 EDT 2000</publish_date><description>An in-depth loo
k at creating applications with XML.</description><price>44.95</price><genre>Computer</genre><title>XML Developer's Guide</title>
</book>
görünüyor ama ben böyle bakmak istiyorum:
<book id="0">
<author>Gambardella, Matthew</author>
<publish_date>Sun Oct 01 00:00:00 EDT 2000</publish_date>
<description>An in-depth look at creating applications with XML.</description>
<price>44.95</price>
<genre>Computer</genre>
<title>XML Developer's Guide</title>
</book>
nasıl biçimlendirme kontrol edebilir? Bir PrettyPrinter
def toXML:Node = XML.loadString(String.format("<%s>%s</%s>", tag, value.toString, tag))
Olası yinelenen [Scala güzel biçimlendirilmiş XML üretmek için nasıl?] (Http://stackoverflow.com/questions/3364627/how-to-produce-nicely-formatted-xml -in-scala) – Suma