New to xml need help.
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 1
- Joined: Wed Feb 24, 2010 11:56 pm
New to xml need help.
Here is my code:
<!ELEMENT catalog (Movie, Actor+)*>
<!-- Declare the movies information -->
<!ELEMENT Movie (title, year, length, topBilledActors)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT year (#PCDATA)>
<!ELEMENT length (#PCDATA)>
<!ELEMENT topBilledActors (#PCDATA)>
<!-- Declare the movieID attribute -->
<!ATTLIST Movie movieID ID #REQUIRED>
<!ATTLIST Movie genre (Action | Comedie | Drama | Fantasy) "Action">
Im trying to get the output to look like this:
<catalog>
<movie movieID="m197" genre="drama">
<title>Monster's Ball</title>
<year>2001</year>
<length>111 minutes</length>
<topBilledActors actorIDs="a0100 a0102"/>
</movie>
<catalog>
Can anybody give me suggestion? especially for the part with the <movie movieID="m197" genre="drama">. I am unavailable to have genre displayed for some odd reason.
<!ELEMENT catalog (Movie, Actor+)*>
<!-- Declare the movies information -->
<!ELEMENT Movie (title, year, length, topBilledActors)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT year (#PCDATA)>
<!ELEMENT length (#PCDATA)>
<!ELEMENT topBilledActors (#PCDATA)>
<!-- Declare the movieID attribute -->
<!ATTLIST Movie movieID ID #REQUIRED>
<!ATTLIST Movie genre (Action | Comedie | Drama | Fantasy) "Action">
Im trying to get the output to look like this:
<catalog>
<movie movieID="m197" genre="drama">
<title>Monster's Ball</title>
<year>2001</year>
<length>111 minutes</length>
<topBilledActors actorIDs="a0100 a0102"/>
</movie>
<catalog>
Can anybody give me suggestion? especially for the part with the <movie movieID="m197" genre="drama">. I am unavailable to have genre displayed for some odd reason.
http://hometryst.com/dc/neighborhood/burleith-real-estate-washington-dc/
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: New to xml need help.
XML is case sensitive. In your DTD you define a Movie element while in the source you have a movie element (note the different case for the first letter). You need to change either the DTD or the instance to have the same name in both.
Best Regards,
George
Best Regards,
George
George Cristian Bina
Return to “General XML Questions”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service