Jak naprawić plik konfiguracyjny Hibernate?

Błąd poniżej otrzymuję po wykonaniu kodu java. Wydaje się, że występuje problem tylko z plikiem XML. Więc nie opublikowałem kodu Java. Kod XML jest podany po błędzie. Skopiowałem go z mojej książki tak jak jest, a mimo to powoduje błąd. Jak naprawić ten irytujący błąd xml?

"Some value of time" org.hibernate.cfg.annotations.Version <clinit>
INFO: Hibernate Annotations 3.3.1.GA
[main] INFO org.hibernate.cfg.Environment - Hibernate 3.3.2.GA
[main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
[main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
[main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
[main] INFO org.hibernate.cfg.Configuration - configuring from resource:     
/hibernate.cfg.xml
[main] INFO org.hibernate.cfg.Configuration - Configuration resource:     
 /hibernate.cfg.xml
[main] ERROR org.hibernate.util.XMLHelper - Error parsing XML:     
/hibernate.cfg.xml(3)     
The markup in the document preceding the root element must be well-formed.
Exception in thread "main" org.hibernate.HibernateException: Could not parse     
configuration: /hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1542)
at org.hibernate.cfg.AnnotationConfiguration.doConfigure
    (AnnotationConfiguration.java:990)
at org.hibernate.cfg.AnnotationConfiguration.doConfigure
    (AnnotationConfiguration.java:69)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1476)
at org.hibernate.cfg.AnnotationConfiguration.configure
    (AnnotationConfiguration.java:972)
at org.hibernate.cfg.AnnotationConfiguration.configure
    (AnnotationConfiguration.java:69)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1462)
at org.hibernate.cfg.AnnotationConfiguration.configure
    (AnnotationConfiguration.java:966)
at com.examscam.model.User.persist(User.java:47)
at com.examscam.model.User.main(User.java:57)
    Caused by: org.dom4j.DocumentException: Error on line 3 of document  : The markup  
    in the document preceding the root element must be well-formed. Nested exception:
    The markup in the document preceding the root element must be well-formed.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1532)
... 9 more

Plik XML jest następujący -

<?xml version = '1.0' encoding='UTF-8' ?>

<!Doctype hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
<session-factory>

<property name = "connection.url">
jdbc:mysql://localhost/examscam
</property>

<property name = "connection.username">
root
</property>

<property name = "connection.password">
password
</property>

<property name = "connection.driver_class">
com.mysql.jdbc.Driver
</property>

<property name = "dialect">
org.hibernate.dialect.MySQLDialect
</property>

<property name = "transaction.factory_class">
org.hibernate.transaction.JDBCTransactionFactory
</property>

<property name = "current_session_context_class">
thread
</property>

<property name = "hibernate.show_sql">
true
</property>

</session-factory>
</hibernate-configuration>

EDYTOWAĆ

org.hibernate.cfg.annotations.Version <clinit>
INFO: Hibernate Annotations 3.3.1.GA
[main] INFO org.hibernate.cfg.Environment - Hibernate 3.3.2.GA
[main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
[main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
[main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
[main] INFO org.hibernate.cfg.Configuration - configuring from resource:
 /hibernate.cfg.xml
[main] INFO org.hibernate.cfg.Configuration - Configuration resource: 
/hibernate.cfg.xml
[main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : 
com/xx  /portal/db/User.hbm.xml
Exception in thread "main" org.hibernate.MappingNotFoundException: resource: com/xx
/portal/db/User.hbm.xml not found
at org.hibernate.cfg.Configuration.addResource(Configuration.java:610)
at org.hibernate.cfg.AnnotationConfiguration.addResource
(AnnotationConfiguration.java:912)
at org.hibernate.cfg.AnnotationConfiguration.parseMappingElement
(AnnotationConfiguration.java:617)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1603)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1582)
at org.hibernate.cfg.AnnotationConfiguration.doConfigure
(AnnotationConfiguration.java:1002)
at    org.hibernate.cfg.AnnotationConfiguration.doConfigure
(AnnotationConfiguration.java:69)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1556)
at org.hibernate.cfg.AnnotationConfiguration.doConfigure
(AnnotationConfiguration.java:990)
at org.hibernate.cfg.AnnotationConfiguration.doConfigure
(AnnotationConfiguration.java:69)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1476)
at org.hibernate.cfg.AnnotationConfiguration.configure
(AnnotationConfiguration.java:972)
at org.hibernate.cfg.AnnotationConfiguration.configure
(AnnotationConfiguration.java:69)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1462)
at org.hibernate.cfg.AnnotationConfiguration.configure
(AnnotationConfiguration.java:966)
at com.examscam.model.User.persist(User.java:45)
at com.examscam.model.User.main(User.java:55) 

questionAnswers(1)

yourAnswerToTheQuestion