Ask Experts Questions for FREE Help!
Answer   ||    Advanced Search

Ask your question or search...
International Sites: Nederlandse experts vragen
User Name 
Password 
Join   Forgot password? 

Home > Computers & Technology > Programming > Markup Languages > XML   »   What have i done wrong in this?

Question
 
 
#1  
Old Aug 27, 2009, 11:49 PM
dan28
New Member
dan28 is offline
 
Join Date: May 2009
Posts: 17
dan28 See this member's comment history on his/her Profile page.
What have i done wrong in this?

Hi, im new to XML and have been struggling. Where have i gone wrong in this bit of code?


<?xml version="1.0" encoding="utf-8"?><!DOCTYPE bibliography [
<!ELEMENT bibliography (book+)>
<!ELEMENT book (author+, title, pub?, year, URL*)>
<!ELEMENT author (
(givenname | nickname)?, surname)>
<!ELEMENT givenname (#PCDATA)>
<!ELEMENT nickname (#PCDATA)>
<!ELEMENT surname (#PCDATA)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT pub (#PCDATA)>
<!ELEMENT year (#PCDATA)>
<!ELEMENT URL (#PCDATA)>
]>
<bibliography>
<book>
<author>
<nickname>Fred</nickname>
<surname>Flintstone</surname>
</author>
<author>
<givenname>Helen</givenname>
<surname>James</surname>
</author>
<title>"Statistical Database Disclosure"</title>
<year>2006</year>
<URL>http://some.webaddress.com</URL>
<URL>http://another.webaddress.com</URL>
</book>
<book>
<author>
<surname>Simpson</surname>
</author>
<title>"Homer's Odyssey"</title>
<pub>Springer Verlag</pub>
<year>2003</year>
</book>
</bibliography>

<journal>
<book>
<author>
<givenname>Alf</givenname>
<surname>Turner</surname>
</author>
<author>
<nickname>Roddy</nickname>
<surname>Stewart</surname>
</author>
<title>lifecycles</title>
<pub>lifepublishing</pub>
<year>1999</year>
<URL>http://some.webaddress.com</URL>
</book>
</journal>

I was given up to </bibliography> and had to add journals to it with 2 entries.
Any help would be appreciated.
Thank you

Reply With Quote
 
     

Answers
 
 
Old Aug 28, 2009, 01:01 AM   #2  
Junior Member
mpolo is offline
 
Join Date: Aug 2009
Posts: 117
mpolo See this member's comment history on his/her Profile page.
<!ELEMENT URL (#PCDATA)>
]>
<bibliography>
  Reply With Quote
 
     
 
 
Old Aug 28, 2009, 01:02 AM   #3  
Junior Member
mpolo is offline
 
Join Date: Aug 2009
Posts: 117
mpolo See this member's comment history on his/her Profile page.
]>
  Reply With Quote
 
     
 
 
Old Aug 28, 2009, 01:38 AM   #4  
New Member
dan28 is offline
 
Join Date: May 2009
Posts: 17
dan28 See this member's comment history on his/her Profile page.
<!ELEMENT URL (#PCDATA)>
]>

Is that where I've done something wrong?
I checked my code on a xml validator and got 15 errors.

I don't understand what i've done wrong and what it should be.
  Reply With Quote
 
     
 
 
Old Oct 14, 2009, 07:11 AM   #5  
Outdoor Power Equipment Expert
crigby is offline
 
crigby's Avatar
 
Join Date: Sep 2008
Location: NC
Posts: 1,682
crigby See this member's comment history on his/her Profile page.
Hi,
The term "PCDATA" is a placeholder for info used in your particular document. Try the tutorial and references at:
W3Schools Online Web Tutorials
Peace,
Clarke
  Reply With Quote
 
     

Your Answer
Email me when someone replies to my answer
Join Login



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Ask your question or search...



Similar Threads
Baby Mama Drama & Was I Wrong, & Was My Boyfriend Wrong?
(31 replies)
I need some one to tell me whats wrong and if any thing is wrong
(12 replies)
What am I doing Wrong?
(6 replies)
wrong place at wrong time
(11 replies)

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page
Search this Thread

Advanced Search

Bookmarks





Copyright ©2003 - 2009, Ask Me Help Desk.
All times are GMT -8. The time now is 06:49 PM.