How to learn XML programming

What’s the best way to learn XML programming? I checked the local community college (though not the technical college) and they do not offer it. Is this the sort of thing there are classes for? Or is it a self-education thing? If the latter, can anyone recommend the best book(s) for learning XML?

Thanks.

What is it you want to do? XML isn’t really a programming language it’s a way of organizing a document so that it can be reliably read, usually by both people and machines. Lots of programs use XML to store things like GUI layouts, settings, or to store their document formats. If you know anything about HTML, XML is a lot like that. I can’t imagine there would be classes for it as it’s quite simple. I’d suggest just finding an XML file and opening it up in Wordpad or something like that(not notepad though it doesn’t support the spacing to view such files properly) and taking a peek just to see what the file is. It’s usually fairly obvious what they’re doing even if you know little to nothing about programming or software in general. And maybe read through the Wikipedia article on it: XML.

The VP wants to set up a new platform where members can order and download reports.

I made HTML pages years ago, but haven’t done any HTML for at least five years. My boss sent me an XML overview, which I will read when I have time. I think the best route to get what the VP wants would be to get a temp in to set it up. If I can learn it, then I could maintain it.

My job involves programming in Easytrieve.

Easytrieve still exists? I was writing that in my first job in 1985! XML stands for eXtensible Markup Language and as Spectralist said it’s a formatting specification, not a programming language.

No idea about easytrieve, but since as others mentioned XML is just the markup language storing the information, how you program can depend a lot on the libraries your programing language implements for interfacing with xml data.

One thing though that you should probably familiarise yourself with for interacting with xml data is xpath. That will give you the syntax typically used for retrieving or searching for nodes in xml documents.

As always start out with something like XML for Dummies and find out what it’s about and then move on to the more complex.

Yep. Experian still uses it, and we work with them. When they decided that all new data we send has to be in their new format, my employer needed someone familiar with them who could do the reformatting. Lucky me! :smiley:

OK, so it sounds like I need to pick up XML for Dummies, and probably Javascript for Dummies as well.

I’d also suggest the w3school. They’re my JavaScript for Dummies. And they have XML, too.

They seem to be down for me right now, but, seeing as that’s never happened to me before, I assume they’ll be up soon.

XML is fairly new, but very basic. As others have said, it’s just a format of the output data. It’s just ASCII. There is nothing very complex about it.

I’ve never heard of Easytrieve, and I’ve been writing code for 20 years or so. That being said, unless it’s kept up with the times, I very much doubt it will easily convert data sets into XML.

Johnny, I am guessing that you pull data from a table/database and need to convert it to XML to then send to Experian. This is VERY easy to do with say VB.NET. (I’m sure C#, Java etal too).

I would say that you would be better served learning a programming language that can query the database and convert the dataset to XML for you. I could send you some code snipits on how this is done.

How is the data sent now/previously? Delimited text I bet.

Easytrieve was originally developed as an easy programming language to retrieve data from a mainframe. It’s a sequential language that bears a passing resemblance to COBOL and SAS. I use it to pull ‘cleaned’ business names and addresses from previous files, write non-matched records to a separate file for cleaning, consolidate open-invoice accounts into a single record (when required), match Customer and Aging records and combine them into a single output record, calculate totals, provide missing fields for the required output formats, de-dup files, and other things. I could probably do the same thing with an OO language, but I don’t know any. Processing the files is a separate thing from what the VP is asking for.

She wants to pull data from our database and generate reports. The reports will be sold directly to the requester, rather than sent to Experian. (We sell our own reports, in addition to Experian, D&B, and other credit management tools.) The XML thing has nothing to do with my job; only I seem to be the only one in the office who knows how to write any kind of code so I’m being asked to see if I can learn how to do what the VP wants to do.

Though I don’t know anything about XML, the concept seems simple enough. I’ve made HTML pages, and I have a Word document on my own (very basic) webpage that people can download. What I imagine the VP is asking for is this: She wants a webpage where our members can choose a report. The data will be drawn from the database, formatted and delivered. Here is some simple code from Wiki’s XML page:


<?xml version="1.0" encoding="UTF-8" ?>
<painting>
  <img src="madonna.jpg" alt='Foligno Madonna, by Raphael'/>
  <caption>This is Raphael's "Foligno" Madonna, painted in
    <date>1511</date>–<date>1512</date>.
  </caption>
</painting>

It seems pretty straightforward. But like my downloadable camera manual, that code just pulls a file (the modonna.jpg) and spits it out. Pulling the required fields from the database and formatting them will be much more complicated. It’s something I can learn, though.

I think what I need to do is to learn the basics of XML; how to retrieve data and put it in the correct output format. Then I’ll have to learn how to apply it to our system. Most importantly, I’ll need a clear outline of what she wants.

What type of database? SQL Server? Do you understand SQL queries? (It does not look like you would need anything complex. SQL is very easy to understand)

I suggested VB.NET because after the query is completed, it puts it in a dataset. That dataset can then be pushed out as XML. You don’t have to do anything. It’s three lines of code.

Building XML from scratch from ehh… not sure what you have, is going to be a big job.

In what format do you sell your current reports?

Heh. I just make the data. I don’t look at the reports. The ones I’ve seen have been hardcopies.

Hmmm… well you make the data and put it into something? File name type? .xls, .mdb, .txt?

Is it propriatory to Easytrieve? Can the data be read by anything but Easytrieve?

Can you look at the file without Easytrieve?

Ummm… Some of your data goes to Experion? So this is sensitive stuff, right? Looks like Client Server to me with AJAX and god only knows what type of security you would need.

This is credit reporting info?

No, the reports that the VP wants are not sent to Experian. That’s what I meant that they’re two separate things. That I know Easytrieve is just to illustrate that I know a language and am familiar with coding. (IATYQ, the data that does get sent to Experian is sent through their secure FTP server. This has nothing to do with the XML thing.)

OK. Well you still need to find out what format Easytrieve outputs the data in before you can consider how to convert it into XML. You could do it with brute force, (and thousands of lines of code) or have something like VB.NET do it for you. Don’t know.

It still sounds like a Client/Server application. It must be.

I’m not trying to scare you, but I think your boss is being a bit unreallistic. This is not a facebook page. I suspect she thinks it’s that easy.

The FB text files go to our database provider. They load the data (just as Experian does). We don’t load the data to the database in-house.

Yes. She thinks she knows more than she does. For example, my browser was hijacked a couple of months ago and unfortunately displayed porn when I tried to show her what it was doing. She concluded that I must have gotten the virus from visiting porn sites, because the browser that opened up had porn on it. (Our outsourced IT guy said he’d explain it to her.) She’s definitely a Marketing & Sales type. I’ve never met a M&S person who really understood technical issues. I’m the ‘technical’ person in the office. But what I’m good at is using an archaic programming language, showing people how to do certain things in Excel (and thanks to Dopers who have helped me with it!), and that sort of thing. When it comes to newer stuff like javascript, OO languages, and that sort of thing, I’m out of my depth until I can sit down and learn it.

Well and good Johnny.

It sound like a delimeted text file that needs to be converted to XML.

Your database provider (? that’s odd) has a way to read it into some sort of table/field level. So, It must have different deliminations between tables and fields.

You need to get ahold of one of those files and look at it.