Ask Experts Questions for FREE Help !
Ask
    dan28's Avatar
    dan28 Posts: 17, Reputation: 1
    New Member
     
    #1

    Aug 27, 2009, 11:49 PM
    What have i done wrong in this?
    Hi, I'm 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
    mpolo's Avatar
    mpolo Posts: 117, Reputation: -3
    Junior Member
     
    #2

    Aug 28, 2009, 01:01 AM

    <!ELEMENT URL (#PCDATA)>
    ]>
    <bibliography>
    mpolo's Avatar
    mpolo Posts: 117, Reputation: -3
    Junior Member
     
    #3

    Aug 28, 2009, 01:02 AM
    ]>
    dan28's Avatar
    dan28 Posts: 17, Reputation: 1
    New Member
     
    #4

    Aug 28, 2009, 01:38 AM

    <!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.
    crigby's Avatar
    crigby Posts: 4,343, Reputation: 107
    Outdoor Power Equipment Expert
     
    #5

    Oct 14, 2009, 07:11 AM

    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

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Baby Mama Drama & Was I Wrong, & Was My Boyfriend Wrong? [ 31 Answers ]

3 threads merged and edited baby mama drama, all messed up! Ok, Me and my boyfriend started going together on August 1st 2007, on September 27th 2007 the girl he dealt with before we got together called him and told him she was pregnant and that the baby might be his but she didn't know if...

I need some one to tell me what's wrong and if any thing is wrong [ 12 Answers ]

My Partner And Me Have Been Having Sex For A Year Already But For 3 Months He Has Done It With Out A Condom And I Have Not Gotten Pregnant And We Really Want To Be Parents. What Is Wrong?:(

What am I doing Wrong? [ 6 Answers ]

I am a Freshmen, and also the Captain of our school's new Rugby team. It seems like at every practice that my teammates get more and more hateful towards me. I do not understand this setup. What am I doing wrong? Why do all the girls hate me? I need some help, I really have no idea what I am...

Wrong place at wrong time [ 11 Answers ]

Hello all Would like you r insight for my sister and her husband. They were recently arrested for murder in the 1st degree and conspiracy to commit robbery. They both claim that they were not going to rob the guy whom was an ex roommate but ask him for the money they felt he owed them when a friend...


View more questions Search