Page 2 of 2 First 12
  • Jump to page:
    #16
  1. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    more information


    actually i want more information regarding this xml.Not only for thisany newlanguage of any latest topic.i want to select for seminar on XML.
    please it is a request from sreenivasa.
    i am an engineer in computer science.
  2. #17
  3. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    more information with examples


    i need to know more about xml and i need to study with examples please
  4. #18
  5. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: What the hell di I do with it ?


    But is it possible to use XSL sheets NOW? I've got a 3 year old site that's a mishmash of perl, php, straight HTML, shtml, etc. - and I'm trying to pull it all together. I'd LOVE to use XML but I can't just make the whole damn site xml because then nobody could read it... I don't want to store every page in a database simply because when you have every page generated dynamically, that removes all the search engine listings from my site :(
  6. #19
  7. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Yeah ... so ....


    I still don't get it ...
    I must be sooooo slow :(

    We have HTML to present the data,
    SQL to manipulate and retrieve the data
    and PHP, ASP, Perl etc. etc. to put the two together.

    ANSI SQL has data definition language to define tables and data structures. This can be fed to most DB's.

    Why do we need to get bogged in more client side complexity when we have the server side tools already?

    Browsers are already becoming bloated monsters ... is this another "embrace and extend" folly?

    <B><FONT SIZE=4>I just don't understand the excitement and hype with XML.</B></FONT>

    I would appreciate an article which shows the clear advantages, situations and examples of where and why XML is so great as opposed to existing tools.

    Phil
  8. #20
  9. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Is XML better than DHTML?


    [font size=+6] is XML better than DHTML?[/font] Sorry about that Hmm i hope it worked
  10. #21
  11. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Is XML better than DHTML?


    [font size=+6] is XML better than DHTML?[/font] Sorry about that Hmm i hope it worked
  12. #22
  13. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: What the hell di I do with it ?


    I'm also wondering about software to combine XML with XSL to create HTML (and other) output. What's good and working?

    Also, concerning website generating from XML stores through XSL: I am considering having one set of XML to store/structure my data (for instance, a botanical catalog) and then an entirely different set of XML (and XSL) to describe the (mostly static, mostly HTML) website as a document (or meta-document.)
    That way, I could make changes to the website document (the presentation of the catalog) and then have my XML+XSL processor recreate any affected HTML files in the actual website directories.

    I hope that made sense :)
  14. #23
  15. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: What the hell di I do with it ?


    One thing you can do is make psuedo-XML using PHP's output buffering technique. Basically, you can use a prepend file (set in php.ini or just include('/prepend.php');). Write a small search/replace deal that replaces the XML tags with the HTML tags you want. So your page would look like:

    <title>blah blah</title>

    <record>
    <name>blah blah</name><address>123 blah lane</address>
    </record>

    The parser can parse that into whatever HTML you need, rather than just parsing it into data/variables which is more processor intensive than simple search/replace. Plus, if you make your doc right, it will be ready for other XML apps to use.
  16. #24
  17. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: What the hell di I do with it ?


    Much of what I want to do is a little complicated to be handled by simple search and replace. I want my data in one place, with XML representations available. And I want my website structure to be described as a document in XML format. Also, the standard structural details of individual pages (like nav bars and seach options, etc..) can be in XML as well.
    Then I'm going to use XSL style sheets to guide the complex transforms (more complex than regular expressions could easily handle, I think anyway,) from those three kinds of XML into (mostly) HTML webpages and website directories. Any dynamic content that these webpages provide will almost certainly be done with PHP tags embedded in the webpages. The PHP, just like the HTML, will be produced by the XSL templates
  18. #25
  19. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: XML and PHP


    There's not really enough information in your question to be too much help. But I'll gladly try..

    Basically, you can get data from a MySQL database using the PHP MySQL functions (consult your PHP manual.)
    Here's an example of accessing a MySQL database and printing the information as HTML. This is taken directly from the PHP maual, Good stuff in there: always read the documentation!

    Example 1. MySQL extension overview example

    Code:
    <?php
        $link = mysql_connect("mysql_host", "mysql_login", "mysql_password")
            or die ("Could not connect");
        print ("Connected successfully");
        mysql_select_db ("my_database")
            or die ("Could not select database");
        
        $query = "SELECT * FROM my_table";
        $result = mysql_query ($query)
            or die ("Query failed");
    
    	// printing HTML result
    
    	print "<table>\n";
    	while($line = mysql_fetch_array($result)){
    		print "\t<tr>\n";
    		while(list($col_name, $col_value) = each($line)){
    			print "\t\t<td>$col_value</td>\n";
    		}
    		print "\t</tr>\n";
    	}
    	print "</table>\n";
        
        mysql_close($link);
    ?>
    Now, you could just as easily write XML as HTML, but there's a better, but still experimental, solution. PHP has a DOM XML function set. Again, see the manual:

    xmldoc Creates a DOM object of an XML document
    domxml_new_xmldoc Creates new empty XML document
    domxml_new_child Adds new child node
    domxml_dumpmem - Creates an XML document from the dom representation. This function usually is called after a building a new dom document from scratch as in the example of domxml_add_root().



    Now, if the data in the MySQL database *already has* XML tags embedded in it you're going to want to use the PHP XML functions to parse it into PHP objects, and then reformat those in HTML or whatever you want for your output.

    There you go, hope that helped!

    ~Simon
  20. #26
  21. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: Yeah ... so ....


    i agree 100% :-)

    sometimes xml just seems like a new hype .... for the people who wanna learn a new thing every other week .... ?
  22. #27
  23. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)
    First off, I hope it works out for you!
    I haven't seen many people use XML in this manner, althought there is no reason why it shouldn't work.

    Anyway, itall sounds fairly reasonable (if a bit complicated), except for PHP tag generation. You could certainly get your XML structures to "copy and paste" bits of PHP code into your otherwise static pages, but if you intend on actually generating dynamic code to make dynamic content(which i don't think has ever been done), I think you're going to run into some problems. I'm pretty sure you aren't going to be able to produce code from templates. Again, the onyl way to get the code in would be to use pre-written code that just gets copied in where appropriate. XSL will probably choke if you ask it to generate PHP (it will also be syntax hell and almost impossible to debug). One last thought, wouldn't XSLT be much more accomidating than XSL to your project?

    -Chris
  24. #28
  25. No Profile Picture
    Ducani
    Guest
    Devshed Newbie (0 - 499 posts)

    An Introduction to XML


    An Introduction to XML

    October 21, 1999 - XML is an acronym for "Extensible Markup Language". XML is the latest, powerful , platform-independent and content-dependent technology in the internet development. Learn all about it here. Read full article .

    Please discuss this article in this thread. You can read the article here .
Page 2 of 2 First 12
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo