[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: DTD's

  • From: Eric Bohlman <ebohlman@e...>
  • To: Al Snell <alaric@a...>, Joel Rees <rees@m...> (pop)
  • Date: Fri, 18 May 2001 11:29:10 -0500

xml timesheet
5/18/01 7:14:20 AM, Al Snell <alaric@a...> wrote:

>On Fri, 18 May 2001, Joel Rees (pop) wrote:
>
>> When I take this to the next step (My boss says I must, but he isn't
>> allocating me time yet.), I will use a RAD tool (Delphi, probably) to set up
>> a quick form that wraps the fields I know I'll need with XML tags and
>> appends it to a text file that will be well-formed when it is generated.
>
>Not doable IIRC... to be well formed, it has to be a single top-level
>element:
>
><timesheet>
> <item>...</item>
> <item>...</item>
></timesheet>
>
>New items need to be inserted before the </timesheet>. YOu will either
>need to process the document through a SAX filter that inserts a new
>element at the appropriate moment, or write code that seeks to the end of
>the file, finds the </timesheet>, writes the new element from that point,
>then puts a new </timesheet> on the end...
>
>XML isn't great for appending to, I don't think it's useful at all for a
>log file (except if the log file is composed of a series of little XML
>documents with a higher-level boundary marking between each).

If you don't have a philosophical objection to the use of XML's built-in entity inclusion 
mechanism, then just treat the log file as a well-formed external parsed entity (which does not 
require a single root element) and parse a "wrapper" file or string like:

<!DOCTYPE timesheet [
<!ENTITY sheetitems SYSTEM "sheetitems.xml">
]>
<timesheet>
&sheetitems;
</timesheet>



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.