Previous  |  Next ]     [ Up  |  First  |  Last ]     (Article 295 of 298)
 
 
A short note about XML parsing
 
Why this document?
Just because hand parsing a text file is sometimes quicker than loading it in a database trough a huge number of cut & paste operations.
 
Here is a very simple XML file generated by MS Access 2003
Fields are:
 
XML files will display the contents within tags:
<Issue><⁄Issue>
<Date><⁄Date>
<Theme><⁄Theme>
<Contents><⁄Contents>
 
So, even a very large XML file will be looking like below:
Hand Parsing is quite easy  with programmers' text editors like TSE:The Semware Editor
http:⁄⁄www.semware.com
 
The second step is to create a stylesheet to display the XML file though a web browser.
 
 As it is not always possible due to time shedules, an intermediate way is possible: Use dummy tags!
 
 
 
 
The big advantage is that they let freedom in the choice of future fields.
So, now you can display the file source code, these tags are not detected by the browser.
 
 
The third step is to generate a pure XML file with its XSLT stylesheet.
 
Note: As the XML file can be imported in a database, all operation like sorting, adding or modifying fields are possible. But the big advantage of XML is to present data in a readable form. The file can be edited and modified with any text editor.
 
 
<?xml version="1.0" encoding="UTF-8" ?>
- <dataroot xmlns:od="urn:schemas-microsoft-com:officedata"
xmlns:xsi="http:⁄⁄www.w3.org⁄2001⁄XMLSchema-instance"
xsi:noNamespaceSchemaLocation="Circuit%20Cellar.xsd" generated="2005-03-
26T22:09:00">
- <Circuit_x0020_Cellar>
<Issue>1<⁄Issue>
<Date>Jan⁄Feb 1988<⁄Date>
<Theme>INSIDE THE BOX STILL COUNTS<⁄Theme>
<Contents>Inside the Box Still Counts, by Steve Ciarcia, 1. Visible Ink
Letters to the INK Research Staff, 2. The Circuit Cellar Motion-
Triggered Video Camera Multiplexer, by Steve Ciarcia, 5-10. Ink Spot
Guest Editorial, 11. High Security on a BudgetBuild a Video
Handscanner⁄Identifier, by Ed Nisley, 13-21. ConnecTimeExcerpts
from the Circuit Cellar INK BBS, conducted by Ken Davidson, 22. The
Home Satellite Weather CenterPart l: RGBI to NTSC Converter, by
Mark Voorhees, 29-34. Firmware Furnace, by Ed Nisley, 35-
39.<⁄Contents>
<⁄Circuit_x0020_Cellar>
- <Circuit_x0020_Cellar>
<Issue>2<⁄Issue>
<Date>Mar⁄Apr 1988<⁄Date>
<Theme>TECHIES<⁄Theme>
<Contents>The Core Audience, by Steve Ciarcia, 1. Readers InkLetters
to the Editor, 2. Circuit Cellar Neighborhood Strategic Defense
InitiativeThe Ballistics Dynamics of Plastic Soda Bottles, by Steve
Ciarcia & Ed Nisley, 5-16. Visible InkLetters to the Circuit Cellar INK
Research Staff, 17. INK SpotGuest Editorial, Leonardo the Techie, by
Phil Lemmons, 21. The Home Satellite Weather CenterPart 2: NTSC
Encoder Alignment and System Overview, by Mark Voorhees, 23-27.
ConnecTimeExcerpts from the Circuit Cellar BBS, conducted by Ken
Davidson, 28. Firmware FurnaceDigitizing Infrared Signals, by Ed
Nisley, 32-42. Personal-Computer-Based InstrumentationBuild a 4-
Channel Temperature Logging and Data Reduction System, by Tom
Riley, 43-48.<⁄Contents>
<⁄Circuit_x0020_Cellar>
- <Circuit_x0020_Cellar>
<Issue>3<⁄Issue>
<Date>May⁄June 1988<⁄Date>
<Theme>CONTROL MAGIC<⁄Theme>
<Contents>Control Magic, by Steve Ciarcia, 1. Readers InkLetter to the
Editor, 2. Power-Line-Based Computer ControlThe X-10 PL513 Power
Line Interface Module, by Ken Davidson, 4-13. Visible InkLetters to
the Circuit Cellar INK Research Staff, 15. The Home Satellite Weather
CenterPart 3: Weather Databases and System Software Overview, by
Mark Voorhees, l9-26. Ink SpotGuest Editorial, The Information Free-
For-All, by Mark Dahmke, 27, ConnecTimeExcerpts from the Circuit
Cellar BBS, conducted by Ken Davidson, 28. Firmware FurnaceVideo
Signal Timing and Real-Time Interrupt Control, by Ed Nisley, 34-41.
SoftUARTSoftware Emulation of Full-Duplex Serial Channels, by Bill
Curlew, 42-48.<⁄Contents>
<⁄Circuit_x0020_Cellar>
<⁄dataroot>  
<html>
<head>
<title>Circuit Cellar Magazine Index of Contents<⁄title>
<meta name="generator" content="Hand corrected v6.0(Trial)">
<⁄head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<p><font face="Arial"><span style="font-size:14pt;">&nbsp;<⁄span><⁄font><⁄p>
    <p align="center"><b><font face="Arial"><span style="font-size:14pt;">Circuit Cellar Magazine Index of Contents:<⁄span><⁄font><⁄b><⁄p>
<p><⁄p>
<p>
&nbsp;<⁄p>
<p>
<b>ISSUE 1<⁄b><br>
<b>Jan⁄Feb 1988<⁄b><br>
<b>Theme: INSIDE THE BOX STILL COUNTS<⁄b><br>
<⁄p>
<Dummy Tag>
<p align="left">Inside the Box Still Counts, by Steve Ciarcia, 1.<br><⁄Dummy Tag>
<Dummy Tag>Visible Ink-Letters to the INK Research Staff, 2.<br><⁄Dummy Tag>
<Dummy Tag>The Circuit Cellar Motion-Triggered Video Camera Multiplexer, by Steve Ciarcia, 5-10.<br><⁄Dummy Tag>
<Dummy Tag>Ink Spot-Guest Editorial, 11.<br><⁄Dummy Tag>
<Dummy Tag>High Security on a Budget-Build a Video Handscanner⁄Identifier, by Ed Nisley, 13-21.<br><⁄Dummy Tag>
<Dummy Tag>ConnecTime-Excerpts from the Circuit Cellar INK BBS, conducted by Ken Davidson, 22.<br><⁄Dummy Tag>
<Dummy Tag>The Home Satellite Weather Center-Part l: RGBI to NTSC Converter, by Mark Voorhees, 29-34.<br><⁄Dummy Tag>
<Dummy Tag>Firmware Furnace, by Ed Nisley, 35-39.<⁄p>
<⁄Dummy Tag>
<Hyperlink Tag>
<p align="right"><br><font face="Arial"><span style="font-size:14pt;"><a href="Circuit_Cellar-001.pdf" target="_blank">Issue 001<⁄a><⁄span><⁄font><⁄p>
<⁄Hyperlink Tag>