It was the UTF-8 Encoding (linebreaks) that made the trouble. Anyway,
simply stripping the string of any newlines is enough.

On Aug 9, 11:57 pm, David Pollak <feeder.of.the.be...@gmail.com>
wrote:
> The XML that you posted works just fine:
> scala> val s = """<body>
>      |        <div id="wrapper">
>      |                <div id="header">
>      |                        <lift:Content.headline />
>      |                        <lift:Content.subheadline />
>      |                        <lift:Content.menu />
>      |                </div>
>      |        </div>
>      |
>      |        <div id="content">
>      |                <show:Content />
>      |        </div>
>      |
>      |        <div id="footer">
>      |                <lift:Content.footer />
>      |        </div>
>      | </body>"""
> s: java.lang.String =
> <body>
>               <div id="wrapper">
>                       <div id="header">
>                               <lift:Content.headline />
>                               <lift:Content.subheadline />
>                               <lift:Content.menu />
>                       </div>
>               </div>
>
>               <div id="content">
>                       <sho...
> scala> import scala.xml._
> import scala.xml._
>
> scala> XML.loadString(s)
> res1: scala.xml.Elem =
> <body>
>               <div id="wrapper">
>                       <div id="header">
>
>  <lift:Content.headline></lift:Content.headline>
>
>  <lift:Content.subheadline></lift:Content.subheadline>
>                               <lift:Content.menu></lift:Content.menu>
>                       </div>
>               </div>
>  ...
> scala>
>
>
>
>
>
> On Sun, Aug 9, 2009 at 9:34 AM, fbettag <fr...@bett.ag> wrote:
>
> > Hi there,
>
> > i know this is not the right place, but i wanted your opinions first.
> > I'm trying to run XML.loadString onto this:
>
> > <body>
> >        <div id="wrapper">
> >                <div id="header">
> >                        <lift:Content.headline />
> >                        <lift:Content.subheadline />
> >                        <lift:Content.menu />
> >                </div>
> >        </div>
>
> >        <div id="content">
> >                <show:Content />
> >        </div>
>
> >        <div id="footer">
> >                <lift:Content.footer />
> >        </div>
> > </body>
>
> > The Problem appears to be with div#header, as soon as i remove it - it
> > works, as soon as i put in (EVEN AN EMPTY) div#header i get this
> > error:
>
> > org.xml.sax.SAXParseException: The element type "div" must be
> > terminated by the matching end-tag "</div>".
> >        at
> > com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse
> > (AbstractSAXParser.java:1269)
> >        at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
> >        at scala.xml.parsing.FactoryAdapter.loadXML
> > (FactoryAdapter.scala:292)
> >        at scala.xml.parsing.NoBindingFactoryAdapter.loadXML
> > (NoBindingFactoryAdapter.scala:60)
> >        at scala.xml.XML$.load(XML.scala:68)
> >        at scala.xml.XML$.loadString(XML.scala:84)
> >        at ag.bett.lift.cms.comet.Others$.show(Others.scala:97)
>
> > Any ideas?
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Git some:http://github.com/dpp
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to