Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript AJAX Basics (retiring) AJAX Concepts Finish the XML Document

Quiz : Add 3 more songs to this XML document. Include title and artist for each song

This is my code

<?xml version="1.0" encoding="UTF-8"?> <songs>
<song> [ { "title" : "My Way", "artist" : "Frank Sinatra"},

  {
  "title" : "Call Me",
  "artist" : "Katie Perry"},

  {
  "title" : "For Me",
  "artist" : "Mary Steward"},

  {
  "title" : "Wind beneath my wings",
  "artist" : "Bette Midler"}
]

</song> </songs>

songs.xml
<?xml version="1.0" encoding="UTF-8"?>
<songs>  
    <song>
    [
      {
        "title" : "My Way", 
        "artist" : "Frank Sinatra"},

      {
      "title" : "Call Me",
      "artist" : "Katie Perry"},

      {
      "title" : "For Me",
      "artist" : "Mary Steward"},

      {
      "title" : "Wind beneath my wings",
      "artist" : "Bette Midler"}
    ]
  </song>
</songs>

1 Answer

Steven Parker
Steven Parker
231,172 Points

It looks like you added new songs but converted all 4 of them into JSON format. But this code is XML, not JSON.

Add the new songs using the same format that the original was was in already. Don't change the original one.

Thanks Steve! That worked!