[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] New Line in an xml document


Subject: Re: [xsl] New Line in an xml document
From: Mulberry Technologies List Owner <xsl-list-owner@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 5 Jun 2006 11:03:38 -0400

Bharathi --

Your question does not seem to be related to XSL.

If there is an XSL-related aspect to the question please re-state the
question so that it is clear. If this is, as it seems, a question about
DocumentBuilderFactory then XSL-List in not an appropriate forum.

-- Tommie


Hey,

I'm trying to insert a new line into an xml document
directly, with the following code:

DocumentBuilderFactory dbf =
DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document outputDoc = db.newDocument();
// Creating the root element DOCUMENT
Element dcmt =
outputDoc.createElement("DOCUMENT");


dcmt.appendChild(outputDoc.createTextNode("before the
newline"));
dcmt.appendChild(outputDoc.createTextNode("&#xA;"));


dcmt.appendChild(outputDoc.createTextNode("after the
new line"));
outputDoc.appendChild(dcmt);


But it never inserted a newline, it only inserted the
text "&#xA;" directly! Any ideas?

Thanks,
Bharathi

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


--
======================================================================
B. Tommie Usdin mailto:btusdin@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Phone: 301/315-9631
Suite 207 Direct Line: 301/315-9634
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in XML and SGML
======================================================================



Current Thread
Keywords
xml