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

How to insert Root Element in XML Output

Subject: How to insert Root Element in XML Output
From: "Gary E. Daniels" <gdaniels@xxxxxxxxxxx>
Date: Wed, 03 May 2006 08:41:32 -0500
insert element xml
Hi. Newbie here. I have an XSL Stylesheet that produces XML as output. How do I code the XSL sheet to add a Root Element to the outputted XML document? Below is an example of the current XML output and the desired XML output with the root element <foo>. Thanks.
Gary



Current XML Output-----


<?xml version="1.0" encoding="utf-8"?>

File #<field id="4"><label>File No.:</label><value>09-06-00120-01</value></field>|
Address <field id="1001"><label>Property Address:</label><value>3901 N Hamilton Ave</value></field>|
City <field id="1002"><label>City:</label><value>Chicago</value></field>|
State <field id="1003"><label>State:</label><value>IL</value></field>|
Zip <field id="1004"><label>Zip:</label><value>60618</value></field>|
Neighborhood <field id="3051"><label>NEIGHBORHOOD (NAME):</label><value>North Center</value></field>|


==========================================================================

Desired XML Output------

<?xml version="1.0" encoding="utf-8"?>
<foo>
File #<field id="4"><label>File No.:</label><value>09-06-00120-01</value></field>|
Address <field id="1001"><label>Property Address:</label><value>3901 N Hamilton Ave</value></field>|
City <field id="1002"><label>City:</label><value>Chicago</value></field>|
State <field id="1003"><label>State:</label><value>IL</value></field>|
Zip <field id="1004"><label>Zip:</label><value>60618</value></field>|
Neighborhood <field id="3051"><label>NEIGHBORHOOD (NAME):</label><value>North Center</value></field>|
</foo>
Gary E. Daniels
Cornerstone Appraisal Company
500 Selkirk Drive
Schaumburg, IL. 60194
847 882-5892 Fax 847 882-5963
mailto:gdaniels@xxxxxxx
http://www.askdata.net


Current Thread

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
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.