markSaunders
Programmer
i have the following code in my ASP and it succesfully creates a file containing the desired elements and their contents.
any ideas as to how i can best have the code appear tidy as opposed to how it currently does (as shown at the bottom of this post)?
cheers
[tt]code excert[/tt]
[tt]example output[/tt]
Mark Saunders
any ideas as to how i can best have the code appear tidy as opposed to how it currently does (as shown at the bottom of this post)?
cheers
[tt]code excert[/tt]
Code:
Set oDetailsNode = oEntryNode.appendChild(oDOM.createElement("COMMON"))
oDetailsNode.Text = sCommon
Set oDetailsNode = oEntryNode.appendChild(oDOM.createElement("MRP"))
oDetailsNode.Text = sMRP
' Now save the XML document
' - NOTE !
' The directory to save it to must have write permissions enabled!
oDOM.Save Server.MapPath("productList.xml")
[tt]example output[/tt]
Code:
<STOCKFILE><STOCK date="27/03/01 15:39:12"><STKNO>ATTEMPT1</STKNO><DESC1>description number 1</DESC1><DESC2>description number 1</DESC2><DESC3></DESC3><DESC4></DESC4><DESC5></DESC5><UNITS>Dozen</UNITS><BIN></BIN><LOC>(None)</LOC><COMMON>Yes</COMMON><MRP>M</MRP></STOCK><STOCK date="27/03/01 15:41:40"><STKNO>ATTEMPT2</STKNO><DESC1>description number 11</DESC1><DESC2>description number 11</DESC2><DESC3></DESC3><DESC4></DESC4><DESC5></DESC5><UNITS>single</UNITS><BIN></BIN><LOC>(None)</LOC><COMMON>No</COMMON><MRP>S</MRP></STOCK><STOCK date="27/03/01 15:43:15"><STKNO>ATTEMPT2</STKNO><DESC1>description number 11</DESC1><DESC2>description number 11</DESC2><LDESC1>this will be the</LDESC1><LDESC2>longer description</LDESC2><LDESC3>lines for the </LDESC3><LDESC4>product number</LDESC4><LDESC5>indicated in ID</LDESC5><UNITS>single</UNITS><BIN></BIN><LOC>(None)</LOC><COMMON>No</COMMON><MRP>S</MRP></STOCK></STOCKFILE>