Log in

View Full Version : can you check this small xml doc please?



arkitect101
12-19-2006, 10:09 PM
Hi.

I couldnt find an xml category on this forum, so i hope I am posting in the right place. Can anyone tell me what is wrong with this xml document? It won't work.

<?xml version="1.0” encoding=“UTF-8” ?>
<CDs>
<Artist name=“Robbie Williams”>
<Album name=“Intensive Care”>
<Price>16.49</Price>
<ReleaseDate>24/10/05</ReleaseDate>
</Album>
</Artist>
<Artist name=“Eminem”>
<Album name=“Curtain Call”>
<Price>12.99</Price>
<ReleaseDate>09/12/05</ReleaseDate>
</Album>
<Album name=“The Eminem Show”>
<Price>9.99</Price>
<ReleaseDate>02/07/04</ReleaseDate>
</Album>
</Artist>
<Artist name=“Arctic Monkeys”>
<Album name=“What Ever People Say”>
<Price>9.99</Price>
<ReleaseDate>14/02/06</ReleaseDate>
</Album>
</Artist>
</CDs>

Thanks.

arkitect101
12-19-2006, 10:11 PM
Ok hopefully the indents will work this time

<?xml version="1.0” encoding=“UTF-8” ?>
<CDs>
<Artist name=“Robbie Williams”>
<Album name=“Intensive Care”>
<Price>16.49</Price>
<ReleaseDate>24/10/05</ReleaseDate>
</Album>
</Artist>
<Artist name=“Eminem”>
<Album name=“Curtain Call”>
<Price>12.99</Price>
<ReleaseDate>09/12/05</ReleaseDate>
</Album>
<Album name=“The Eminem Show”>
<Price>9.99</Price>
<ReleaseDate>02/07/04</ReleaseDate>
</Album>
</Artist>
<Artist name=“Arctic Monkeys”>
<Album name=“What Ever People Say”>
<Price>9.99</Price>
<ReleaseDate>14/02/06</ReleaseDate>
</Album>
</Artist>
</CDs>

arkitect101
12-19-2006, 10:13 PM
ok NOW i hope it works with indents

<?xml version="1.0” encoding=“UTF-8” ?>
<CDs>
. <Artist name=“Robbie Williams”>
. <Album name=“Intensive Care”>
. <Price>16.49</Price>
. <ReleaseDate>24/10/05</ReleaseDate>
. </Album>
. </Artist>
. <Artist name=“Eminem”>
. <Album name=“Curtain Call”>
. <Price>12.99</Price>
. <ReleaseDate>09/12/05</ReleaseDate>
. </Album>
. <Album name=“The Eminem Show”>
. <Price>9.99</Price>
. <ReleaseDate>02/07/04</ReleaseDate>
. </Album>
. </Artist>
. <Artist name=“Arctic Monkeys”>
. <Album name=“What Ever People Say”>
. <Price>9.99</Price>
. <ReleaseDate>14/02/06</ReleaseDate>
. </Album>
. </Artist>
</CDs>

arkitect101
12-19-2006, 10:16 PM
FFS. ok hopefully this works. The dots represent the spaces

.<?xml version="1.0” encoding=“UTF-8” ?>
.<CDs>
.....<Artist name=“Robbie Williams”>
..........<Album name=“Intensive Care”>
...............<Price>16.49</Price>
...............<ReleaseDate>24/10/05</ReleaseDate>
..........</Album>
.....</Artist>
.....<Artist name=“Eminem”>
..........<Album name=“Curtain Call”>
...............<Price>12.99</Price>
...............<ReleaseDate>09/12/05</ReleaseDate>
..........</Album>
..........<Album name=“The Eminem Show”>
...............<Price>9.99</Price>
...............<ReleaseDate>02/07/04</ReleaseDate>
..........</Album>
.....</Artist>
.....<Artist name=“Arctic Monkeys”>
..........<Album name=“What Ever People Say”>
...............<Price>9.99</Price>
...............<ReleaseDate>14/02/06</ReleaseDate>
..........</Album>
.....</Artist>
.</CDs>

Splashbrooke
12-19-2006, 10:28 PM
What message do you get? WHat are you trying to do with it?

Splashbrooke
12-19-2006, 10:29 PM
also do you have a link to the file?

boxxertrumps
12-19-2006, 10:33 PM
Nothing You have Done Changes the Code At All.

Adding The Periods would most likely break it.

You XML isnt well formed if its not displaying.

Descibe your problem.

arkitect101
12-19-2006, 10:37 PM
first of all i am trying to learn xml basics. What the xml document does should be straight forward for humans to understand.

It is a listing of music CDs.

An artist has an album
An album has a price and a release date.

I tried to run it in IE but it doesnt work.

mwinter
12-19-2006, 10:48 PM
<?xml version="1.0” encoding=“UTF-8” ?>

You are using left and right double-quotation marks (U+201C [“] and U+201D [”]), rather than "straight" quotation marks (U+0034 ["]). By all means use the former as well as left and right single-quotation marks (U+2018 [‘] and U+2019 [’]) in character data, but not in markup.

To maintain formatting, use the &#91;code&#93;...&#91;/code&#93;, &#91;html&#93;...&#91;/html&#93;, or &#91;php&#93;...&#91;/php&#93; vB code delimiters:



<?xml version="1.0" encoding="utf-8" ?>
<CDs>
<Artist name="Robbie Williams">
<Album name="Intensive Care">
<Price>16.49</Price>
<ReleaseDate>24/10/05</ReleaseDate>
</Album>
</Artist>
<Artist name="Eminem">
<Album name="Curtain Call">
<Price>12.99</Price>
<ReleaseDate>09/12/05</ReleaseDate>
</Album>
<Album name="The Eminem Show">
<Price>9.99</Price>
<ReleaseDate>02/07/04</ReleaseDate>
</Album>
</Artist>
<Artist name="Arctic Monkeys">
<Album name="What Ever People Say">
<Price>9.99</Price>
<ReleaseDate>14/02/06</ReleaseDate>
</Album>
</Artist>
</CDs>

Mike