CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2008
    Posts
    5

    3 easy XML theory questions

    Hi guys, slightly confused with understanding the concept of XML.

    1. As I understand it, XML is used to describe and define data, right?

    Now, for a simple XML file to be displayed on a webpage, I need to use a style sheet language, such as CSS or XSL or XSLT. Now, I know what CSS is and what it can do, but how does it differ to XSL and XSLT?

    XSLT can transform the document into a readable HTML/XHTML page?? But I thought only XHTML pages could integrate XML? And what is XSL without Transofmration? Just CSS?


    2. Sort of what I said up there - How come in the examples here, that XML file is able to be displayed as an actual .xml file in the browser? If that is the case, what is the purpose of HTML/XHTML? Does XSLT and XML completely obsolete XHTML/HTML?


    3. Where does the DTD and/or XML schema come into play in this easy demonstration?


    Thanks guys, hopefully I can understand this a little easier with your help..

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: 3 easy XML theory questions

    Quote Originally Posted by hertshelp
    Now, for a simple XML file to be displayed on a webpage, I need to use a style sheet language, such as CSS or XSL or XSLT. Now, I know what CSS is and what it can do, but how does it differ to XSL and XSLT?

    XSLT can transform the document into a readable HTML/XHTML page?? But I thought only XHTML pages could integrate XML? And what is XSL without Transofmration? Just CSS?
    I think you misunderstand XML. It would be good for you to look at this Wikipedia article about XML. It also will answer your questions about DTD.

    CSS is stylesheets for HTML/XHTML only. It has nothing to do with XML. XSL styles XML.

    In order to display XML, you must have a parser. HTML doesn't just parse it by itself.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125

    Re: 3 easy XML theory questions

    Quote Originally Posted by PeejAvery
    In order to display XML, you must have a parser.

    Strange......

    I display it all the time from the command line prompt. create/modify/view using edlin....

    Why would you need a parser to DISPLAY it????
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  4. #4
    Join Date
    Apr 2008
    Posts
    5

    Re: 3 easy XML theory questions

    Quote Originally Posted by PeejAvery
    I think you misunderstand XML. It would be good for you to look at this Wikipedia article about XML. It also will answer your questions about DTD.

    CSS is stylesheets for HTML/XHTML only. It has nothing to do with XML. XSL styles XML.

    In order to display XML, you must have a parser. HTML doesn't just parse it by itself.
    I can easily create an XML document styled in CSS...I don't know what you're talking about...

    Can anyone actually answer my question? Would be so very grateful!

  5. #5
    Join Date
    May 2002
    Posts
    10,943

    Re: 3 easy XML theory questions

    Quote Originally Posted by TheCPUWizard
    Why would you need a parser to DISPLAY it????
    Yes, it is true you can view the raw data, but if you are viewing it online, why would you not want to see it parsed? Think about making tables with it. Those are always parsed.

    Quote Originally Posted by hertshelp
    I can easily create an XML document styled in CSS...I don't know what you're talking about...
    CSS can be used, but it is not industry standard...nor the recommended method by anyone.

    Quote Originally Posted by http://www.w3schools.com/Xml/xml_display.asp
    Formatting XML with CSS is not the most common method.

    W3C recommend using XSLT instead.
    Quote Originally Posted by hertshelp
    Can anyone actually answer my question? Would be so very grateful!
    Sorry for trying to help. I won't waste my time to bother you anymore.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  6. #6
    Join Date
    Apr 2008
    Posts
    5

    Re: 3 easy XML theory questions

    Can anyone else help to answer the questions in my original post?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured