For those of you familiar with using xml --
I want to be able to code an xml form which will do basic mathmatical operations and store data. For exmple, my end user would see a form that said "Enter X" and "Enter Y", and after the user entered X & Y, the page would calculate X/Y, display the result, and then store everything.
Now, my actual question is not "how do I do this?" but "how annoying is it to learn enough xml to know how to do this sort of thing?" It seems like a simple enough kind of thing, but I've not actually coded in xml before. I will have access to an exceedingly simple xml form designer which will do the "enter and store X&Y" part, but not do operations based on the data entered. I kinda want to just manually edit the designer's code and add the other stuff, but I'm not sure if this falls in the category of "browse webpages on xml coding and figure it out" or "get an xml book and figure it out" or "1-day training course" or "college class". Suggestions?
I want to be able to code an xml form which will do basic mathmatical operations and store data. For exmple, my end user would see a form that said "Enter X" and "Enter Y", and after the user entered X & Y, the page would calculate X/Y, display the result, and then store everything.
Now, my actual question is not "how do I do this?" but "how annoying is it to learn enough xml to know how to do this sort of thing?" It seems like a simple enough kind of thing, but I've not actually coded in xml before. I will have access to an exceedingly simple xml form designer which will do the "enter and store X&Y" part, but not do operations based on the data entered. I kinda want to just manually edit the designer's code and add the other stuff, but I'm not sure if this falls in the category of "browse webpages on xml coding and figure it out" or "get an xml book and figure it out" or "1-day training course" or "college class". Suggestions?
json
Date: 2010-04-29 12:32 pm (UTC)As for XML itself, here is the summary for all you need to know to start:
Namespace:
xmlns:edi='http://ecommerce.example.org/schema'
At the top of the document. An arbitrary text string that just appears to look like a url. Your supposed to make a unique one for each type of file/data and in theory going to that url would give you a listing of all the fields - but practically no one ever actually sets up the documentation page - so it's just a meaningless string.
Basically, it's so a program would now that
xmlns:edi='http://ecommerce.example.org/schema1.0'
and
xmlns:edi='http://ecommerce.example.org/schema1.1'
Are 2 different formatting options for data, elements and attributes:
http://www.w3schools.com/DTD/dtd_el_vs_attr.asp
XML elements:
something like
tagname..tagdata....closetagname
Logical, self explanatory, the data is inside the tags.
Then you could have something like
setoftags
tag1name...tagdata...closetag1name
tag2name...tagdata...closetag2name
closesetoftags
Again, all of that is intuitive sense.
But most people like to store data in attributes instead, so it's
tagname....data=value....closetag
or even something like
setofdataname....name1=value1...name2=value2....closesetofdataname
Almost every language, including javascript has a parser to parse the xml into something meaningful, http://www.w3schools.com/xmL/xml_parser.asp that can then have programming assigned to it.
Re: json
Date: 2010-04-29 01:32 pm (UTC)Thanks for the advice and links! Very nifty. :)