This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
BOUNCE xsl-list@lists.mulberrytech.com: Non-member submissionfrom [rlai@aptis.com]
- To: xsl-list <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] BOUNCE xsl-list@lists.mulberrytech.com: Non-member submissionfrom [rlai@aptis.com]
- From: owner-xsl-list at lists dot mulberrytech dot com (by way of B. Tommie Usdin)
- Date: Thu, 11 Jan 2001 09:29:31 -0500
- Reply-To: xsl-list at lists dot mulberrytech dot com
>From rlai@aptis.com Tue Jan 9 11:46:45 2001
Received: from hartman.aptis.com (hartman.aptis.com [132.245.91.10])
by biglist.com (8.8.8/8.8.5/BL-2) with ESMTP id LAA00950
for <xsl-list@lists.mulberrytech.com>; Tue, 9 Jan 2001
11:46:44 -0500 (EST)
From: rlai@aptis.com
Received: from crawford.aptis.com ([132.245.90.13]) by
hartman.aptis.com with SMTP (Microsoft Exchange Internet Mail Service
Version 5.5.2650.21)
id C1JZW77X; Tue, 9 Jan 2001 11:46:15 -0500
Received: (from rlai@localhost)
by crawford.aptis.com (8.9.1/8.9.1) id LAA15834
for xsl-list@lists.mulberrytech.com; Tue, 9 Jan 2001 11:43:18
-0500 (EST)
Date: Tue, 9 Jan 2001 11:43:18 -0500 (EST)
Message-Id: <200101091643.LAA15834@crawford.aptis.com>
subject: convert a non-xml file to xml using xsl?
Content-Type: text
I am new to this and wonder if we can use XSL to convert a non-XML
file into XML.
The file format I am interested is very similar to XML. For example:
configure network [1]
configure router [1]
configure interface [ 1 ]
set ip 1.2.3.4
set mask 255.255.255.0
commit
return
configure interface [ 2 ]
set ip 3.4.5.6
set mask 255.255.255.0
commit
return
return
configure switch [1]
configure interface [ 1 ]
set ip 5.6.7.8
set mask 255.255.255.0
set nexthub 132.132.132.132
commit
return
return
return
The expected XML format would be something like
<network id = "l">
<router id = "1">
<interface id = "1">
<ip>1.2.3.4></ip>
<mask>255.255.255.0</mask>
</interface>
<interface id = "2">
<ip>3.4.5.6></ip>
<mask>255.255.255.0</mask>
</interface>
</router>
<switch id = "1">
<interface id = "1">
<ip>5.6.7.8></ip>
<mask>255.255.255.0</mask>
<nexthub>132.132.132.132</nexthub>
</interface>
</switch>
</network>
Can we use XSL to convert it?
Thanks :)
Richard
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list