XML Video Tutorial 5

XML Entity Video TutorialIn this part of my XML video tutorial, I will cover how to use an entity. I’ll also show you how to combine XML, DTD and XSL files.

You can use an entity to create shortcuts in your DTD files. You create personal codes like those built into XML like &lt; is replaced with <.

Through using these codes you’ll be able to pull data either from within the DTD file, or from external files. All of the code follows the video.

If you like videos like this, tell Google [googleplusone]

Sharing is very much appreciated [nttfblike]

Code From the Video

TVSHOW5.XML

TVSHOW5.DTD

TVSHOW5.XSL

TVSHOW5.ENT

TVSHOWSDIS.ENT

13 thoughts on “XML Video Tutorial 5”

  1. hi bro i have no idea about c+ or c++ but a web said me if i learn c++ it will be easy for me to learn any other programming language like php easily, is it true ? suggest me please. and i also have seen that you are very expert in php, python, java, xml , jquery etc. i really want to be a programmer like you.

    1. In my opinion C++ would be a terrible first language. You could actually wreck your computer if you did something incorrect with C++.

      I think Python is the best first language, but you’ll eventually be limited by what you can do with Python if you want to program on the web. That still doesn’t mean you shouldn’t learn Python, because it is an easy language to learn and very powerful.

      If you want to create web applications above all else I’d say JavaScript is a great choice. You’ll be able to do great things very fast and it is a pretty easy language to learn.

      After you learn JavaScript, PHP would be an obvious next choice. With PHP and JavaScript you’ll be able to do most anything on the web.

      I hope that helps

      Derek

  2. Thanks Derek for explaining the topic so in detail.

    I have followed the above code step by step but getting the following error when viewed in firefox & IE.

    IE version: 9
    Firefox version: 13.0.1

    XML Parsing Error: undefined entity
    Location: file:///C:/xxx/xxx/xxx/xxx/TVSHOW1.xml
    Line Number 10, Column 170:

    1. It can’t locate the TVSHOW1.xml file. You have to point to the location of that file on your computer. It would be different from mine. If you find that everything should work fine.

      1. Thanks Derek,

        I will check & let you know meanwhile when DTD is embeded inside xml.

        The entities(great) is showing up.

        But when DTD is defined in an external file it is giving error.

        I will let you know

      2. Thanks Derek,

        When I am placing DTD inside xml file the entity(&great;) is displaying the description.

        but when it is displayed as an external file it is not.

        I will let you once its working.

  3. 1. first of all you have awesome tutorials and thank you very much for sharing.
    2. I think the content of TVSHOW5.ENT and TVSHOWSDIS.ENT should be the other way around.

  4. The naming of the files is incorrect ! Jeee it took me a while 🙂 In the xsl it is correct, the problem is on this page!
    The disclaimer should be in the file tvshowsdis.ent!
    And poster should be in tvshows5.ent. Just change this page and please use filenames in the correct case 🙂
    Do they practice the exercices, the others ? 🙂

  5. It is NOT possible to open the XML in Firefox (on Linux/Ubuntu). Did not figure a way to make it work!
    XML Parsing Error: undefined entity
    Location: file:///home/rudy/xml/tutorials/derek/5/tmp/tvshow5.xml
    Line Number 9, Column 90: The series tells the story of New York City police detective Sam Tyler. &great; &tv_disclaimer;
    —————————————————————————————–^

    To open the file in Chromium (Linux/Ubuntu) you have to pass
    –allow-file-access-from-files
    rudy@m3800:~$ chromium-browser –allow-file-access-from-files
    ATTENTION: default value of option force_s3tc_enable overridden by environment.

    http://stackoverflow.com/questions/3828898/can-chrome-be-made-to-perform-an-xsl-transform-on-a-local-file

    The Eclipse browser does not complain! Mr Banas, you should try in your Safari to check if you can open the xml. In the video it is from your Eclipse 🙂

  6. Yes like it was written by gabikiwi on this page TVSHOW5.ENT and TVSHOWSDIS.ENT reference the wrong contents! Would you be kind to use the naming you make reference in the DTD ? tvshow5.ent and tvshow5dis.ent ? As always thanks a lot for your work Mr Banas!

  7. A last remark before to go to the next :
    Eclipse does return the following when the tag description is hovered : The content of element type “description” must match “null”. The tag is underlined in red but that does not prevent the xsl transformation.

Leave a Reply

Your email address will not be published. Required fields are marked *