What is XML - and ....

Status
Not open for further replies.

Michael Joel

Usenet Archive
Joined
Jul 10, 2012
Messages
3
Reaction score
0
Ok. I am not an expert on and language but I get by decent enough on javascript, PHP (and mySQL), VB (which has nothing to do with this), I can do perl if I have to... But I do not have a clear understanding of what XML is.

It appears to be a simple mark up language yet, from what I see, the mark up looks like it is whatever is wanted. I mean it looks like you make up your own tags. Is that basically what it is, some form of customer "html"? - but I imagine that you need something that describes what the tags do.

How does one implement XML?
What is it used for?

Also (not as important)...
I have a large XML file (KJV of The Bible) it has a lot of data in it. I need to breaking up for use in a mySQL database. My initial idea would be to us VB to work on the tags. But I thought there might already be something out there that would let me define how to handle tags (such as I want some tags gone, I have no need for them) and I want the XML split in certain ways. I would like some of the tags attributes (I do not know what else to call them) shortened to only the needed ones for my purpose)...

So is it best just to write some VB or is there something like that?
 

Joe Kesselman

Usenet Archive
Joined
Feb 3, 2006
Messages
1,229
Reaction score
0
XML a standard for raw syntax. It isn't a markup language; it's a shared base for many markup languages, to facilitate writing tools which can be reused across many or all of them.

In other words, it occupies much the same niche that SGML did. (HTML is an SGML-syntax markup language.) You can think of XML as a modernized, replacement for SGML -- sort of a "RISC" SGML, trimmed down to the essentials and cleaned up for today's needs.

For your task of importing of the XML version of the Bible, what one would normally do is grab one of the many XML parsers on the market which deal with all the details of properly reading and interpreting the syntax, and present the output either as an event stream (SAX) or an in-memory data model (DOM). Then all you'd have to write is the code which interprets the SAX events, or walks the DOM tree, selecting from that the information you want to copy into your database.

For details beyond that, I'm going to hand you my standard pointer to IBM's developerWorks site (http://www.ibm.com/developerworks/xml/), where you will find many tutorials and articles ranging from basic to expert. At the very least, that will give you enough background to ask useful questions.

Welcome to the 21st century!
 

Joe Kesselman

Usenet Archive
Joined
Feb 3, 2006
Messages
1,229
Reaction score
0
Oh, one other note: If you want to know more about what the markup in your XML document actually _means_, you need to find out which XML-based language was used. There may be comments, or a DTD (Document Type Description) reference, or a Schema reference, at the top of the document which will point you in the right direction to find more information. If you aren't sure, ask whoever/wherever you got that document from.

(BTW, note that some of the other great religious works of the world are also available as XML documents; these were early test files for XML tools.)
 

mike myers

Usenet Archive
Joined
Feb 23, 2001
Messages
13
Reaction score
0
On Tuesday, August 7, 2012 1:23:51 AM UTC+1, Michael Joel wrote:
Ok. I am not an expert on and language but I get by decent enough on

javascript, PHP (and mySQL), VB (which has nothing to do with this), I

can do perl if I have to... But I do not have a clear understanding of

what XML is.

It appears to be a simple mark up language yet, from what I see, the

...

As you said, xml is a markup language, its original purpose was to allow webpages to be displayed in a set way regardless of the brower being used, in much the same way you can use xml to transport data caross systems and to be able to read that data independant of the platform or tied to any system.

You may find this short tutorial on xml useful,

http://www.liquid-technologies.com/xml.aspx

Also if you are going to be working with vb, take a look at liquid xml studio and its code gen function which will spit out vb, c# and c++ code based on your xml or schema.

http://www.liquid-technologies.com/xmldatabinding/xml-schema-to-vb.aspx
 

Peter Flynn

Usenet Archive
Joined
Jan 2, 2000
Messages
1,813
Reaction score
0
On 07/08/12 01:23, Michael Joel wrote:
Ok. I am not an expert on and language but I get by decent enough on javascript, PHP (and mySQL), VB (which has nothing to do with this), I can do perl if I have to... But I do not have a clear understanding of what XML is.

The FAQ is at http://xml.silmaril.ie/

It appears to be a simple mark up language yet,

It's a misleading name. XML, like its predecessor SGML, is actually a metalanguage to let you design your own markup. It's just a syntax: the semantics are up to you.

from what I see, the mark up looks like it is whatever is wanted. I mean it looks like you make up your own tags. Is that basically what it is,

Yes, exactly.

some form of customer "html"?

Not really; XHTML is written in XML, and so are hundreds of other markup languages, like DocBook or TEI.

but I imagine that you need something that describes what the tags do.

"Tags" (actually called "elements") don't "do" anything except sit there and identify what's in them. I think what you may mean is that you need a document describing how they should be used. Yes, you do, and if you invent a new markup language using XML, you need to write that document.

For example, DocBook5 is described in
http://www.docbook.org/tdg5/en/html/docbook.html; the TEI is described in http://www.tei-c.org/Guidelines/; XHTML is described in http://www.w3.org/TR/xhtml2/; ODF is described in https://www.oasis-open.org/standards#opendocumentv1.2, and OOXML is described in http://www.ecma-international.org/publications/standards/Ecma-376.htm

How does one implement XML?

By using a markup language written in XML for your application. You then need companion languages like XSLT2 to transform the XML into specific targets (eg HTML or PDF), XQuery for specifying searches, and a whole bunch of other X-things to do assorted other tasks.

What is it used for?

Pretty much everything these days. Although originally designed for text markup, it can also be used for rectangular data, so you'll find it used for config files, data transfer, messaging, e-commerce, medicine, and lots of other areas.

Also (not as important)... I have a large XML file (KJV of The Bible)
it has a lot of data in it.

Do you mean metadata? That is, data OTHER than the actual text? Like links, explanations, commentary, etc?

I need to breaking up for use in a mySQL database. My initial idea would be to us VB to work on the tags.

Technically possible, but I'd use XSLT2.

But I thought there might already be something out there that would let me define how to handle tags (such as I want some tags gone, I have no need for them) and I want the XML split in certain ways. I would like some of the tags attributes (I do not know what else to call them) shortened to only the needed ones for my purpose)...

So is it best just to write some VB or is there something like that?

XSLT2 sounds like what you want. It's a programming language actually written in XML syntax. There are several implementations: probably the most popular is Saxon.

///Peter
 
Status
Not open for further replies.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,050
Messages
3,104,249
Members
248,133
Latest member
DujonT

Latest Threads

Top