Microformats are a way to embed specific semantic data into the HTML that we use today. One of the first questions an XML guru might ask is "Why use HTML when XML lets you create the same semantics?" I won't go into all the reasons XML might be a better or worse choice for encoding data or why microformats have chosen to use HTML as their encoding base. This article will focus more on how to extract microformats data from the HTML, how the basic parsing rules work, and how they differ from XML.
Contact Information in HTML
One of the more popular and well-established microformats is hCard. This is a vCard representation in HTML, hence the h in hCard, HTML vCard. You can read more about hCards on the microformats wiki. A vCard contains basic information about a person or an organization. This format is used extensively in address book applications as a way to backup and interchange contact information. By Internet standards it's an old format, the specification is RFC2426 from 1998. It is pre-XML, so the syntax is just simple text with a few delimiters and start and end elements. We'll use my information for this example.
0 comentarios