Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: FAQ candidate? parsing line-separated text files (was: Re: Off-topic: DOS script for XML directory listing)

From: "Robert C. Lyons" <boblyons@---------->
To:
Date: 3/1/2000 6:50:00 PM
Francis,

Clever solution.

I see one problem:
The solution doesn't work if any of the file names
in xmlDir.lst contains an ampersand 
(e.g., "Tom & Jerry.doc"), since an external parsed 
general entity (e.g., xmlDir.lst) can not contain
an unescaped ampersand.

Perhaps there is a DOS command that is similar to
the Unix sed command; your batch program could then
replace each ampersand in the xmlDir.lst file with "&amp;".
I'm not aware of such a DOS command.

Bob

------
Bob Lyons
EC Consultant
Unidex Inc.
1-732-975-9877
boblyons@xxxxxxxxxx
http://www.unidex.com/


> -----Original Message-----
> 
> This is a pure DOS / XML / XSLT way of creating an XML file containing
> directory listing. It's based on my earlier solution which didn't
> tolerate embedded spaces in filenames.
> 
> The solution now takes a line-separated text file and 
> processes it into
> an XML file. Doing this requires two uses of XML entities, firstly a
> system entity to read the text file into the content of an 
> XML element;
> and secondly a character entity to access the acii 10 
> linefeed character
> to parse that content. 
> 
> For anyone unfamiliar with system entities, run the 
> xmlDir.bat, then see
> the difference between looking at xmlDir.xml in a text 
> processor and in
> an xml processor like IE5. Ta-da...
> 
> I was never very fond of XML entities so this was a useful 
> exercise for
> me, I hope it helps others too.
> 
> Francis.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent