+ Reply to Thread
Results 1 to 7 of 7

Thread: XML

  1. #1
    Junior Member
    Join Date
    Aug 2000
    Posts
    15

    XML

    I've been learning XML. it seems to me that XML does not offer more than ASP would. say we want to display some data on the web. we'll need to write code that's as messy as ASP and we need to write Stylesheet for it. so does anyone think XML has its advantage over ASP? Thanks a lot.

  2. #2
    Banned qball's Avatar
    Join Date
    Oct 1999
    Location
    Rockaway, NJ 07866
    Posts
    1,730
    XML is a markup language like HTML. ASP, Active Server Pages is a server side scripting language COM/DCOM compliant.

    Comparing them is similar to comparing an excel spreadsheet with a DOS batch file. XML is tagged 'data'. The tags define the data in the form of meta-data. For example:
    "qball" may be tagged as FirstName for a Customer. The XML would show this. XML tags describe the data. HTML tags describe how the data is to be displayed. Knowing the data is far superior to knowing how it is to be displayed.

    ASP supports VBScript, JScript, JavaScript, and ASP tags, and they are processed differently. Anyway, ASP is used for logical processing of data. Iffin data in the form of XML great, we can determine what it is, else we need to know the data, which will be coded and thus maintained.

    Hope this helps.

  3. #3
    Junior Member
    Join Date
    Aug 2000
    Posts
    15
    thanks qball for the reply. it helps. only i still have some questions.

    if i want to put some nice formatted data onto the web, the data is stored in a SQL server, which would you recomment? use pure ASP to get the data and format the page, or use XML and ASP?

    i was experimenting with the xml samples came with SQL Server. this is what i got
    <IMG SRC="http://home.uleth.ca/~ye.wang/xml.gif" border=0>
    i think that's probably not the format that most end users would want to see. is it because the style sheet is set up this way? or is it because xml just works this way?

    thanks in advance.

  4. #4
    Member
    Join Date
    Apr 2001
    Posts
    187
    What you have shown is neither, it means something is screwing up...
    That looks like the raw html/xml.

    Think of it this way, XML is another way to format things on a webpage. I think(mho) that it is harder to use, but easier in the long run(especially common format over a large site), and you get more control. For what it sounds like you are doing, it would be far easier to just use asp and throw the data in a plain old html table. Unless you have some complicated requirements where you would require more than that, using xml would probably make it harder.
    With that said, xml is more than that...just making it simple for this question..
    dragonB

  5. #5
    Junior Member
    Join Date
    Aug 2000
    Posts
    15
    that's great. i don't need to use XML after all. thanks dragonB.

    another question is if we need to do something special to make internet explorer recoganize xml formated file? i didn't do anything since i don't know what need to be done. i think that might be where i screwed up. i'm currently using IE5.5

  6. #6
    Member
    Join Date
    Apr 2001
    Posts
    187
    Uhoh, I'm so embarassed. I gave you bad info. But, the conclusion is the same.
    I had actually confused CSS(cascading style sheets) with xml, so my description above referred only to CSS.
    Knowing I didn't fully understand, I went looking.
    XML is actually a brother to HTML, they both started from SGML.
    XML is harder to use, and I didn't find any really good short descriptions of it. I guess just think of it as a more powerful HTML, one where you can define your own tags, and how they work. Of course that means more work for you. And it's only currently supported by the latest browsers.
    Here's a good link that puts it fairly simple http://www.htmlgoodies.com/tutors/xml.html
    They also have some asp stuff on that site.
    It looks like in reality right now, there's no reason to use XML. I've seen specialty things use it like one that showed chemical structures.
    Your second question I'm not sure on. Probably.
    gd luck
    dragonB

  7. #7
    Banned qball's Avatar
    Join Date
    Oct 1999
    Location
    Rockaway, NJ 07866
    Posts
    1,730
    There may be an XML parser you could use to take the XML and format as an HTML table, but let's keep things really simple.

    The screenshot shows what appears to be an XML chunk from a SQL query, the result set. You can easily code ASP to execute this same query, returning the XML result set. You can easily write the ASP code to read result set line by line formatting into a nice HTML table. You can even write code to turn the OrderID values into hyperlinks to show that orders details, but that is whistles and bells.

    Now, what I don't know exactly is the XML capabilities of SQLServer. It may already have an XML parser that will do the above easily. Considering the output in the screenshot, I would research SQLServer's XML capabilities, which means, at this time, I'm of little help.

Bookmarks

Posting Permissions

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







New Security Features Planned for Firefox 4
Another Laptop Theft Exposes 21K Patients' Data
Oracle Hits to Road to Pitch Data Center Plans
Microsoft Preps Array of Windows Patches
Microsoft Nears IE9 Beta With Final Preview
Simplified Analytics Improve CRM, BI Tools
Android Passes RIM as Top Mobile OS in 2Q
VMware Updates Hyperic System Management
File Monitoring Key to Enterprise Security
LinkedIn Snaps Up SaaS Player mSpoke