[Lift] how to redirect with OpenIdVendor

2009-09-14 Thread night_stalker
hi all, excuse me for asking another newbie question. I'm integrating openID with net.liftweb.openid, how to redirect or run some js in the postLogin method? // import my packages of User and UserOp trait CustomOpenId extends OpenIdVendor { type UserType = User // note: in lift 1.1, use

[Lift] Re: Getting Maven Offline Mode Working

2009-09-14 Thread Kevin Wright
Glad I could help :)Hope the flight goes okay... On Mon, Sep 14, 2009 at 1:33 AM, Peter Robinett pe...@bubblefoundry.comwrote: Thanks, Kevin. Dropping in the latest version didn't seem to work (mvn --version kept saying I still had 2.0.9) but switching to 1.1-M5 did. Peter On Sep 13, 4:00

[Lift] Re: Lift deal breakers

2009-09-14 Thread valotas
On Sep 14, 3:43 am, marius d. marius.dan...@gmail.com wrote: I kinda used the term js file a bit too loosely. It is true that each page would likely have different functions there and even the same page on subsequent load would have different content so the file can not really be cached.

[Lift] Re: Why isn't this a trait in lift-json?

2009-09-14 Thread Joni Freeman
On Sep 14, 8:14 am, Naftoli Gugenheim naftoli...@gmail.com wrote: Can't you require back ticks and name the case class members the same as in the JSON? This works pretty well, thanks for pointing out this solution! I added name demangling to support back ticks and removed @path annotation. It

[Lift] Re: Master build failing...

2009-09-14 Thread Timothy Perrett
Just pushed a fix. Cheers, Tim On Sep 14, 9:23 am, Timothy Perrett timo...@getintheloop.eu wrote: Guys, Master build on hudson is now failing Naftoli, it looks like your commit has broken the build. Could you please take a look and correct it asap? We have a process by which you must

[Lift] Re: Nested binding

2009-09-14 Thread Heiko Seeberger
Jose, please take it from here: http://wiki.github.com/dpp/liftweb/how-to-binding-view-content-to-code Cheers, Heiko 2009/9/14 José María josemariar...@gmail.com Hi, I want to render the content of some tables one after another: table 1 data table 2 data table 3 data I want to

[Lift] Re: Lift deal breakers

2009-09-14 Thread Indrajit Raychaudhuri
On Sep 14, 7:35 am, Charles F. Munat c...@munat.com wrote: But we've got a desideratum, anyway. Maybe down the road someone will have time to look at it. Thanks for the clarification! And also enable somebody (myself) take a pause and (re-)learn/ understand many important concepts in the

[Lift] Re: Ajax example from the book

2009-09-14 Thread Daniel Nelson
If you're referring to the Exploring Lift book, have a look at Section 3.11.1 Binding Values in Snippets where it explains bind. (I'm new to Lift myself and hopefully not leading you astray.) 1. myFunc's html parameter is fed automatically by the HTML Lift Template. In the follow example,

[Lift] Re: MappedDate.setFromAny only works with strings?

2009-09-14 Thread Kevin Wright
IIRC, scala-time is a wrapper over joda-time anyway I vote +100 for moving away from Java's dates and all the associated problems. 0-indexed month numbers and thread-unsafe parsing are just the tip of that particular iceberg... On Mon, Sep 14, 2009 at 5:23 PM, Derek Chen-Becker

[Lift] Re: MappedDate.setFromAny only works with strings?

2009-09-14 Thread Derek Chen-Becker
Anyone else care to comment? Joda Time and Scala Time are both licensed Apache, so I don't think there would be any issues there, but this would be a significant change. Would anyone here strongly prefer to stay with java.util.Date? Derek On Sat, Sep 12, 2009 at 12:56 PM, Charles F. Munat

[Lift] Re: Nested binding

2009-09-14 Thread José María
That's what I need Heiko!! But I've another problem, the following code: def estante1 (xhtml : NodeSeq ) : NodeSeq = this.estante(xhtml, Peluches, List(180L,34L,55L) ) def estante (xhtml: NodeSeq, nombre: String, listaProductos : List [Long]) : NodeSeq = { bind(estante, xhtml,

[Lift] Re: MappedDate.setFromAny only works with strings?

2009-09-14 Thread Timothy Perrett
java.util.Date isnt thread safe so its probably best we move away from that anyways... Cheers, Tim On 14 Sep 2009, at 17:23, Derek Chen-Becker wrote: Anyone else care to comment? Joda Time and Scala Time are both licensed Apache, so I don't think there would be any issues there, but

[Lift] Re: Lift deal breakers

2009-09-14 Thread David Pollak
On Sat, Sep 12, 2009 at 11:48 AM, Charles F. Munat c...@munat.com wrote: I, too, would like to be able to move the liftAjax script call to the bottom of the page. Open a ticket and I'll see what I can do... it shouldn't be too hard Chas. Dustin Whitney wrote: Hey, I like Lift so in

[Lift] Re: Lift deal breakers

2009-09-14 Thread David Pollak
On Sat, Sep 12, 2009 at 7:21 AM, Indrajit Raychaudhuri indraj...@gmail.comwrote: On Sep 12, 7:02 pm, marius d. marius.dan...@gmail.com wrote: On Sep 12, 8:34 am, Indrajit Raychaudhuri indraj...@gmail.com wrote: Even if we assumed that Lift managed to do all the hard work, we still

[Lift] Re: Lift deal breakers

2009-09-14 Thread David Pollak
On Mon, Sep 14, 2009 at 12:51 AM, valotas valo...@gmail.com wrote: On Sep 14, 3:43 am, marius d. marius.dan...@gmail.com wrote: I kinda used the term js file a bit too loosely. It is true that each page would likely have different functions there and even the same page on subsequent

[Lift] Re: Lift deal breakers

2009-09-14 Thread David Pollak
Nothing in Lift the way it exists today would preclude such a setup. Just as I was able to integrate with Cappuccino (which is all JS-generated view), it's dead simple to integrate with any other non-markup framework. The thing that triggered this thread was Lift's insertion of JavaScript into

[Lift] JSON forms problem

2009-09-14 Thread glenn
This may be a question for the Lift Book forum, but has anyone gotten the JSON forms example 8.13 in the Lift Book to work? When I tried it, the JsonHandler in class JSONForm never gets called when the submit button is clicked. Glenn --~--~-~--~~~---~--~~ You

[Lift] Re: Why isn't this a trait in lift-json?

2009-09-14 Thread David Pollak
On Sun, Sep 13, 2009 at 3:31 PM, marius d. marius.dan...@gmail.com wrote: On Sep 13, 3:15 pm, Joni Freeman freeman.j...@gmail.com wrote: Hi, That annotation is used to configure the json path when extracting values. By default the extraction code assumes that case class parameter

[Lift] Re: Why isn't this a trait in lift-json?

2009-09-14 Thread David Pollak
On Sun, Sep 13, 2009 at 10:02 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: Is there a list of rules for committers to stick to? Especially considering the review board system being put into place. No... it's been word of mouth to date. Maybe after we get user-level documentation in

[Lift] Re: Why isn't this a trait in lift-json?

2009-09-14 Thread Naftoli Gugenheim
Can someone detail the minus side of annotations? (Other than it's just not the Scala/Lift way. :) Preferably in terms of what goal it inhibits.) Also keep in mind that the exception in terms of the code being in a Java source file is a temporary workaround that will be replaced when it's

[Lift] ANNOUNCE: New functionality for Mapper logging with breaking changes

2009-09-14 Thread Derek Chen-Becker
Hi all, I've made a change to the Mapper logging functionality. The DB.addLogFunc method has changed to: addLogFunc( f: (DBLog,Long) = Any) where DBLog is a new trait (below) and the Long corresponds to the *total* duration of a given DB execution method. DBLog is defined as: trait DBLog {

[Lift] Re: Why isn't this a trait in lift-json?

2009-09-14 Thread David Pollak
On Mon, Sep 14, 2009 at 10:34 AM, Naftoli Gugenheim naftoli...@gmail.comwrote: Can someone detail the minus side of annotations? (Other than it's just not the Scala/Lift way. :) Preferably in terms of what goal it inhibits.) Annotations inhibit the goal of simple, uniform code written in a

[Lift] Re: Using Ajax to send text to browser as it is generated.

2009-09-14 Thread David Pollak
I think you want Lift's comet support. Take a look at the clock in examples project. On Sun, Sep 13, 2009 at 9:32 PM, jack jack.wid...@gmail.com wrote: I have some code that generates a list of urls but it takes awhile to generate all of them. I would like to send them to the browser as they

[Lift] Re: Why isn't this a trait in lift-json?

2009-09-14 Thread Timothy Perrett
Whilst I cant speak for anyone else - looking at Java these days generally makes me want to be sick and annotations are simply convulsion inducing ;-) There are some issues from a technical perspective with Scala annotations (like deep nested annotations for JPA), but otherwise, in terms of lift

[Lift] Re: Lift deal breakers

2009-09-14 Thread Timothy Perrett
Just wading into the fray here... Looking at people who have responded to this thread, they are mainly people i've not seen on the list before (sorry if your regulars perhaps i should pay more attention!) and that indicates to me that general users dont want *any* js in page (either in the head,

[Lift] Re: Why isn't this a trait in lift-json?

2009-09-14 Thread Viktor Klang
For me, annotations in Scala are permissible when having to deal with Java frameworks that need annotations to work. (examples: JAX-RS, JPA et al) On Mon, Sep 14, 2009 at 8:06 PM, Timothy Perrett timo...@getintheloop.euwrote: Whilst I cant speak for anyone else - looking at Java these days

[Lift] Re: Getting Maven Offline Mode Working

2009-09-14 Thread Peter Robinett
Great. I should have downloaded it again just now to see if it was up to date, instead I just assumed it hadn't been updated. Thanks for doing the installer, it's a great way for Mac people to get started with Lift. Peter On Sep 14, 12:52 am, Timothy Perrett timo...@getintheloop.eu wrote:

[Lift] Re: Best way to write a wizard

2009-09-14 Thread David Pollak
On Sun, Sep 13, 2009 at 10:52 AM, Josh Suereth joshua.suer...@gmail.comwrote: All, I write to you (unfortunately still) as a lift n00b. I'm trying to modify a form such that it looks more wizard like. i.e. I want it to specifically state You've completed part 1, you're on step 2 of 5,

[Lift] Re: how to send an attachment using Mailer?

2009-09-14 Thread David Pollak
On Sun, Sep 13, 2009 at 6:15 AM, george geo...@mattandgeorge.com wrote: update: ok, so it turns out that you can send pdfs as inline attachments using XHTMLPlusImages. (the byte array being empty was my fault). however, it would still be good to be able to add arbitrary attachments. a pdf

[Lift] Re: How do I hook up JS events to onsubmit on a lift-controlled form?

2009-09-14 Thread David Pollak
On Tue, Sep 8, 2009 at 7:02 PM, DMB combust...@gmail.com wrote: Hi, folks, I'm moving one of my old ruby based apps over to Scala/Lift to learn Lift better, and here's one thing I was not able to find how to do. Some forms in the old app have onsubmit event on the form tag which combines

[Lift] Re: Why isn't this a trait in lift-json?

2009-09-14 Thread Timothy Perrett
Viktor you disappoint me! Was hoping you might chime in with some witty retort about java ;-) lol. Your right though - sometimes there is just no other way if your inter- oping with some java framework that loves annotations. Cheers, Tim On 14 Sep 2009, at 19:22, Viktor Klang wrote: For

[Lift] Re: Why isn't this a trait in lift-json?

2009-09-14 Thread Indrajit Raychaudhuri
Absolutely, and just limit to that, no more. /Indrajit On Sep 14, 11:22 pm, Viktor Klang viktor.kl...@gmail.com wrote: For me, annotations in Scala are permissible when having to deal with Java frameworks that need annotations to work. (examples: JAX-RS, JPA et al) On Mon, Sep 14, 2009 at

[Lift] Re: Why isn't this a trait in lift-json?

2009-09-14 Thread Viktor Klang
On Mon, Sep 14, 2009 at 8:52 PM, Timothy Perrett timo...@getintheloop.euwrote: Viktor you disappoint me! Was hoping you might chime in with some witty retort about java ;-) lol. Sorry mate, I'll have to buy you a beer at Devoxx! :D Your right though - sometimes there is just no other way

[Lift] Re: Lift deal breakers

2009-09-14 Thread Viktor Klang
On Mon, Sep 14, 2009 at 8:20 PM, Timothy Perrett timo...@getintheloop.euwrote: Just wading into the fray here... Looking at people who have responded to this thread, they are mainly people i've not seen on the list before (sorry if your regulars perhaps i should pay more attention!) and

[Lift] Re: Why isn't this a trait in lift-json?

2009-09-14 Thread Naftoli Gugenheim
Wow, isn't it amazing how passionate people could be about something without having a reason? ;) Thanks for your answers, DPP! - Indrajit Raychaudhuriindraj...@gmail.com wrote: Absolutely, and just limit to that, no more. /Indrajit On Sep 14, 11:22 pm,

[Lift] Re: Why isn't this a trait in lift-json?

2009-09-14 Thread Viktor Klang
On Mon, Sep 14, 2009 at 9:00 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: Wow, isn't it amazing how passionate people could be about something without having a reason? ;) If you start me up if you start me up I'll never stop... Thanks for your answers, DPP!

[Lift] Re: How to stop validations if previous validator returns error.

2009-09-14 Thread David Pollak
I'll check code in after it passes the reviewboard process that let's you mix in: trait StopValidationOnError[T] extends Function1[T, List[FieldError]] to a validation function such that the validator will stop processing a given field if a validator that has that trait mixed in returns a

[Lift] Re: Lift deal breakers

2009-09-14 Thread Charles F. Munat
Done David Pollak wrote: On Sat, Sep 12, 2009 at 11:48 AM, Charles F. Munat c...@munat.com mailto:c...@munat.com wrote: I, too, would like to be able to move the liftAjax script call to the bottom of the page. Open a ticket and I'll see what I can do... it shouldn't be

[Lift] Re: Best way to write a wizard

2009-09-14 Thread Charles F. Munat
Gotta love a tool called bind-o-matic. Is it available from Ronco? Does it come with bonus laxatives? But wait, there's more! Ugh. Chas. David Pollak wrote: On Sun, Sep 13, 2009 at 10:52 AM, Josh Suereth joshua.suer...@gmail.com mailto:joshua.suer...@gmail.com wrote: All,

[Lift] Re: Master build failing...

2009-09-14 Thread Derek Chen-Becker
Out of curiosity, can Hudson be set to email the committers when the build fails? On Mon, Sep 14, 2009 at 2:23 AM, Timothy Perrett timo...@getintheloop.euwrote: Guys, Master build on hudson is now failing Naftoli, it looks like your commit has broken the build. Could you please take a

[Lift] JodaTime and JPA

2009-09-14 Thread Charles F. Munat
It occurs to me that I should probably share this. I've been using Jorge's wonderful Scala wrapper for JodaTime and I needed to persist DateTime and LocalDate. I found a Hibernate project that makes this possible. (Note that Jorge's wrapper is a work in progress and doesn't cover everything

[Lift] Re: Master build failing...

2009-09-14 Thread David Pollak
On Mon, Sep 14, 2009 at 12:36 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: Out of curiosity, can Hudson be set to email the committers when the build fails? It emails me. We could change that, but we'd also have to add the from address to the closed committers group. On Mon, Sep

[Lift] Re: Ajax example from the book

2009-09-14 Thread Derek Chen-Becker
I think that he's referring to the SetHtml, which is actually a JsExp that has to be returned from any Ajax functions (the javascript is returned to the client and executed). In the case of the example code, it will set the contents of the div with the id my-div to a single Text element of That's

[Lift] Re: Ajax example from the book

2009-09-14 Thread Jack Widman
Thanks. Yes thats what I meant. On Mon, Sep 14, 2009 at 3:42 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: I think that he's referring to the SetHtml, which is actually a JsExp that has to be returned from any Ajax functions (the javascript is returned to the client and executed). In the

[Lift] Re: Ajax example from the book

2009-09-14 Thread Jack Widman
I was referring to that book. Is there another? :) Thanks for your help Daniel. On Mon, Sep 14, 2009 at 9:52 AM, Daniel Nelson dpn53...@gmail.com wrote: If you're referring to the Exploring Lift book, have a look at Section 3.11.1 Binding Values in Snippets where it explains bind. (I'm new

[Lift] Re: setting cookies in an ajax response

2009-09-14 Thread David Pollak
Please open a ticket at http://github.com/dpp/liftweb/issues On Sat, Sep 12, 2009 at 10:54 AM, harryh har...@gmail.com wrote: I have an SHtml.ajaxSelect that, when executed sets a cookie: S.addCookie(HTTPCookie(CITYID, city.id.toString)) and then returns a JsCmds.RedirectTo(uri) command.

[Lift] Re: Lift deal breakers

2009-09-14 Thread Viktor Klang
On Mon, Sep 14, 2009 at 9:29 PM, Charles F. Munat c...@munat.com wrote: When you say that direct JS callbacks (i.e. onclick=foo()) outperforms _any_ other approach what is the source for your assertion? And what do you mean by outperforms? What are the criteria? Are you talking about speed?

[Lift] Re: JSON forms problem

2009-09-14 Thread glenn
Actually, the JsonHandler in the example gets called, but not the apply (in:Any) method, as that is never called in the book example. Also, the handler seems to be called twice with every submit. Why is that? Glenn On Sep 14, 8:08 am, glenn gl...@exmbly.com wrote: This may be a question for

[Lift] Re: Lift deal breakers

2009-09-14 Thread Charles F. Munat
My sites are low traffic mostly, so a fraction of a second isn't that important to me, but I can see how it might be to you. (Which is not to say that I don't try to minimize hits to the database, combine files, minify, etc., all of which are fractional-second improvements, usually.) I don't

[Lift] Re: Nested binding

2009-09-14 Thread Heiko Seeberger
Jose, Please use - instead of -- The latter is deprecated and seems to do weird things ;-) Cheers, Heiko 2009/9/14 José María josemariar...@gmail.com That's what I need Heiko!! But I've another problem, the following code: def estante1 (xhtml : NodeSeq ) : NodeSeq = this.estante(xhtml,

[Lift] Sermo, persistent comet chat example

2009-09-14 Thread Bjarte Stien Karlsen
Hello lifted, Today i created Sermo [1] as the title says a persistent comet based chat example. I copied code from demo.liftweb.net/chat and modified to support - user's firstname + lastname is the username in the chat - messages are persisted in the message table and loaded when the chat

[Lift] Mapper: Why is every SQL query sent twice? (second time with NULL parameters)

2009-09-14 Thread tiro
Dear all, on every findAll request, lift seems to send the query twice (tested 1.0 and 1.0.2, working from the PocketChangeApp example on h2database, and using DB.addLogFunc((query, time) = Log.info(query + : + time + ms))) for logging 1. e.g. right after login; this must be framework

[Lift] Re: Sermo, persistent comet chat example

2009-09-14 Thread David Pollak
On Mon, Sep 14, 2009 at 1:18 PM, Bjarte Stien Karlsen bjarte.stien.karl...@gmail.com wrote: Hello lifted, Today i created Sermo [1] as the title says a persistent comet based chat example. I copied code from demo.liftweb.net/chat and modified to support - user's firstname + lastname is

[Lift] Re: Sermo, persistent comet chat example

2009-09-14 Thread Bjarte Stien Karlsen
Hello David, Thanks for your comments. So you mean that instead of using m.id.obj then I should fetch all users in a map and lookup in that instead? mvh Bjarte On Mon, Sep 14, 2009 at 10:39 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Mon, Sep 14, 2009 at 1:18 PM, Bjarte Stien

[Lift] Re: Ajax example from the book

2009-09-14 Thread Randinn
Not at the moment but it does have a group http://groups.google.com/group/the-lift-book On Sep 15, 5:45 am, Jack Widman jack.wid...@gmail.com wrote: I was referring to that book. Is there another? :) Thanks for your help Daniel. On Mon, Sep 14, 2009 at 9:52 AM, Daniel Nelson

[Lift] Re: Sermo, persistent comet chat example

2009-09-14 Thread David Pollak
On Mon, Sep 14, 2009 at 2:17 PM, Bjarte Stien Karlsen bjarte.stien.karl...@gmail.com wrote: Hello David, Thanks for your comments. So you mean that instead of using m.id.obj then I should fetch all users in a map and lookup in that instead? import mapper._ private var chats:

[Lift] Re: Bug in HasManyThough causing unexpected deletions?

2009-09-14 Thread harryh
I'm still seeing this on M5. My diagnosis of the prolem in my 2nd e- mail is incorrect, but there is definitely a problem here. -harryh On Aug 28, 1:39 pm, harryh har...@gmail.com wrote: Tips are on TipLists based on TipListBinds. Tips are also hooked to a Venue: class Tip extends

[Lift] Re: Sermo, persistent comet chat example

2009-09-14 Thread Bjarte Stien Karlsen
Thanks, I googled a little bit and found this sollution myself as well :) Will push it to github any minute now. mvh Bjarte On Mon, Sep 14, 2009 at 11:42 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Mon, Sep 14, 2009 at 2:17 PM, Bjarte Stien Karlsen

[Lift] MINOR BREAKING CHANGE IN mapper.view.ModelView

2009-09-14 Thread Naftoli Gugenheim
If you use ModelView in a ModelSnippet, read the following: I added an inner class to mapper.view.ModelSnippet called ModelView, which extends mapper.view.ModelView but allows you to leave out the snippet parameter. However if you were using these new classes you may have to make a small

[Lift] Re: JodaTime and JPA

2009-09-14 Thread Derek Chen-Becker
Quite nice. Hibernate is really flexible with user-defined types. I wish that JPA had a general mechanism for it... Derek On Mon, Sep 14, 2009 at 1:39 PM, Charles F. Munat c...@munat.com wrote: It occurs to me that I should probably share this. I've been using Jorge's wonderful Scala wrapper

[Lift] Re: Best way to write a wizard

2009-09-14 Thread David Pollak
On Mon, Sep 14, 2009 at 1:12 PM, Josh Suereth joshua.suer...@gmail.comwrote: On Mon, Sep 14, 2009 at 2:31 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Sun, Sep 13, 2009 at 10:52 AM, Josh Suereth joshua.suer...@gmail.comwrote: All, I write to you (unfortunately still) as

[Lift] Re: Mapper: Why is every SQL query sent twice? (second time with NULL parameters)

2009-09-14 Thread David Pollak
On Mon, Sep 14, 2009 at 3:56 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: With my own project using the new logging code that I just committed, I don't see dup queries. This is against 1.1-SNAPSHOT, so I don't know if there's a bug in 1.0, but I would think that if things were really

[Lift] Re: email encoding problem

2009-09-14 Thread David Pollak
On Sat, Sep 12, 2009 at 9:54 AM, night_stalker usur...@gmail.com wrote: Thank you all for your replies. I just modified net/liftweb/util/Mailer.scala, replaced all text/html with text/html;charset=UTF-8 , then problem solved. I'll check this in the result mail's Content-Type part

[Lift] The bridge of sorrows

2009-09-14 Thread David Pollak
What is your name? What is your quest? What is your favorite color? How do you do this in Lift? http://demo.liftweb.net/simple_wizard -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp

[Lift] Re: Subquerys Mapper?

2009-09-14 Thread David Pollak
Sorry, Lift's mapper doesn't let you do this. :-( On Fri, Sep 4, 2009 at 9:01 AM, José María josemariar...@gmail.com wrote: Hi, Is it possible to do subqueries with Mapper? If I have something like: Product.findAll(...) How can I use it as subquery for another query? What I'm trying to

[Lift] Re: The bridge of sorrows

2009-09-14 Thread Charles F. Munat
You, Sir Lancelot on the quest I seek the Holy Grail may cross the bridge of sorrows... David Pollak wrote: What is your name? What is your quest? What is your favorite color? How do you do this in Lift? http://demo.liftweb.net/simple_wizard -- Lift, the simply functional web

[Lift] trouble with comet Clock example

2009-09-14 Thread jack
I compiled the comet Clock app and used the following markup lift:surround with=default at=content lift:comet type=Clock name=Other clk:timeMissing Clock/clk:time /lift:comet /lift:surround I also used the standard default.html When I ran it, I got the error XML parsing failed: syntax