Changing from a .txt file to an XML file.

Changing from a .txt file to an XML file.

Anonymous
Not applicable
356 Views
3 Replies
Message 1 of 4

Changing from a .txt file to an XML file.

Anonymous
Not applicable
We have a program that reads an ASCII text file and generates a drawing from the info found in the Text file. The program that cretes the text file, is being changed to produce an XML file. I am thinking of using VBA to read the XML file and Assign values to LISP variables. I believe there may be built in Visual Basic routines that can read XML files? IS this correct? The LISP program that actually generates the drawing is about 20,000 lines and will not be affected, therefore I do not want to re-write in VBA. I only want to use VBA to read the XML files and assign values to LISP vars. Any suggestions on this?
0 Likes
357 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
VBA has no XML processing capabilities but you can
use the MSXML library from VBA or LISP. MSXML ships with MDAC so the chances are
that you already have it on your system. If not, just look for the latest
version of Microsoft Data Access Components here:

 



--
There are 10 kinds of people. Those who understand binary and
those who don't.

 



style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
We
have a program that reads an ASCII text file and generates a drawing from the
info found in the Text file. The program that cretes the text file, is being
changed to produce an XML file. I am thinking of using VBA to read the XML
file and Assign values to LISP variables. I believe there may be built in
Visual Basic routines that can read XML files? IS this correct? The LISP
program that actually generates the drawing is about 20,000 lines and will not
be affected, therefore I do not want to re-write in VBA. I only want to use
VBA to read the XML files and assign values to LISP vars. Any suggestions on
this?
0 Likes
Message 3 of 4

Anonymous
Not applicable
Frank, Thanks for your input. Can you explain what you mean when you say "but you can use the MSXML library from VBA or LISP"? How would I use it in LISP? Would it give me functions such as (example) ReadXML(element) which would return the value of the "element" field/section. Probably stupid questions but this all very new to me. Thanks
0 Likes
Message 4 of 4

Anonymous
Not applicable
VisualLISP is capable of working with the objects
exposed by COM servers such as the MSXML library. It's not as easy or intuitive
as working with VBA but it would be a pure LISP solution.

 



--
There are 10 kinds of people. Those who understand binary and
those who don't.

 



style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Frank,
Thanks for your input. Can you explain what you mean when you say "but you can
use the MSXML library from VBA or LISP"? How would I use it in LISP? Would it
give me functions such as (example) ReadXML(element) which would return the
value of the "element" field/section. Probably stupid questions but this all
very new to me. Thanks
0 Likes