#1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2001
    Location
    New Zealand
    Posts
    638
    Rep Power
    14

    Question Who cares about XML?


    Greetings All,

    If there is anybody out their to comment, and your using XML with success, I'd like to hear it.

    I've just read up on XML and it was interesting. I understand why its better than HTML, because of its flexiblity. Two parties can agree to communicate, agree on the format, and then use the XML D2D to send data to each other. What I'm really interested in is what is the application of XML to the current environment? Will companies really put their heads together to use XML as a method of describing data, will they transmit it using XHTML? Right now I don't think so, although I know PHP can parse XML, which is pretty cool But let me know if you've used XML, and what for. I think that in the future XHTML is obviously going to have an impact on the way we design, but right now I'm still struggling to work out what its practical use to businesses can be....

    Z.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Location
    New York
    Posts
    122
    Rep Power
    14
    I can understand your skepticism towards xml since it has been followed by an incredible wave of hype. However, I disagree with your implication that XML is not being applied in the "real world".

    XML usage is growing everyday. For one example, look at the excitement in both the JAVA camp and the Microsoft.NET camps regarding web services. Web Services are an exciting new standard for syndicating data and functionality over the internet and they rely on xml for communication between the services and their proxies.

    In my limited experience, xml has been extremely helpful in describing and storing data that I had to present via different UIs. Also, as an information junkie, I think that RSS and other xml-based models for syndicating web content (check out: http://www.devshed.com/devshednews.rdf) are very exciting.

    I think that most skepticism towards xml grows out of xml's own simplicity. It's hard for us to grasp how an idea so simple could be so important and produce so much change.

    Just my two cents worth.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2001
    Location
    New Zealand
    Posts
    638
    Rep Power
    14
    hey, hey, hey...

    You got me wrong. Like I said in the future everything will move towards XML, and the new standard XHTML proves that entirely.

    I'll be clearer about what I'm interested in: can I use XML today to increase performance for my web service? I just want to hear if XML is being used in accordance with the amount of hype its getting, which is huge . I guess I want somebody to prove to be XML is a viable option....

    Okay let's take an example... lets say I have a web service which takes data from an HTML form, loads it into my DB with PHP, my DB processes it, and PHP gives back the results in the browser. Now lets say I want to offer users of my site a XML service. How can I do this?

    I know that PHP can parse XML, which is cool, and load that information into my Database. Great, but how do my users get their information from their DB into an XML format and send it to my cool PHP XML parser, which will then load it to my system?

    Here's seems a problem for me, I assume XHTML is the method to use... perhaps somebody can hit me with some tutorials or information on this because this is where I find the problem.

    I guess I should have asked this first.... but there didn't seem to be much discussion in this forum

    Thanks,
    Z.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Location
    New York
    Posts
    122
    Rep Power
    14
    For simply moving data from one db to another, which is what you're talking about if I follow you, I wouldn't use xhtml. xhtml is focused on presentation of the data more than describing it. It's a nice transition between html and xml as far as the basic rules of well-formedness go, but it doesn't do much in the way of describing the data that's marked up.

    If I had a recordset in a db that I want to send to you so that you could insert it in your db, I would have to do something like the following:

    First I would make the relevant query to MySQL and then I would have to loop through my recordset to map the data to a set of xml tags. Once I had my data mapped and my xml doc assembled, I guess I could make it http-addressable so that your app could come and get it. What I would probably do is give you an http address that you could pass search parameters to via the querystring and thus the whole process would be automated from my perspective.

    This seems like no big deal right? Well it is a big deal (in my mind anyway) because we don't have to know anything about each other's data models to exchange data. Really we don't have to know anything at all about each other's processes if we using an industry standard xml dialect.

    If I were using Oracle rather than MySQL, I could use their x-query technology to query the database in a xml-formatted manner and received a recordset that's already mapped to xml for me.

    On a related note, it will be interesting to see how xml and relational databases evolve together. Relational databases aren't necessarily the best way to store heirarchical data structures often found in xml docs. Furthermore, a slew of companies are developing commercial "native xml databases".
  8. #5
  9. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Chapel Hill, NC
    Posts
    21
    Rep Power
    0

    Best Use of XML


    I have a question that is similar to those mentioned in this thread.

    Take this situation

    Data from multiple preexisting DB is available via a pipe (|) delimited text file. The structure of the text files is not the same.

    Step 1. I import the data into a MYSQL with the "LOAD INTO" command


    Step 2. PHP queries the DB and returns results, search pages, ect.

    Step 3. I format output with PHP and using templates for
    either PDA and HTML

    I would like to use XML in this process to make it easier to import and format data


    Does any one have any suggestions on the most efficient way to make this situation happen.

    Would it make sense to convert the text file to some standard XML and then import it?

    Should I produce XML output and then format it with stylesheets or use a XML parser built into PHP?


    Any advise on this would be helpfull. I am interested in using TomCat/Cocoon from apache or other open source technologies.

    Thanks

IMN logo majestic logo threadwatch logo seochat tools logo