Hello All,

could anyone suggest me how to add these lines(reference to a xsl
document)in the xml document which i generate dynamically....


I'm getting the following xml document, even though i had these code in my
servlet.


ProcessingInstruction pi =
cvcontext.OutDocument.createProcessingInstruction("xml-stylesheet",
"href=\"instruction.xsl\" type=\"text/xsl\"");
cvcontext.OutDocument.insertBefore(pi,
cvcontext.OutDocument.getFirstChild()); (cvcontext.outDocument is a Document
object)

//if i print the document after these lines, i get this xml document.

<?xml version="1.0" encoding="UTF-8"?>
<cv>
<status>
<type>Success</type>
<statusbar>
        <code>CVM-00871</code><text>Action Completed</text>
</statusbar>
</status>
</cv>


but i'm expecting a document like this,


<?xml version="1.0" encoding="UTF-8"?>
<?xml:stylesheet type="text/xsl" href="instruction.xsl" >
<cv>
<status>
<type>Success</type>
<statusbar>
        <code>CVM-00871</code><text>Action Completed</text>
</statusbar>
</status>
</cv>

Could anyone suggest me what i'm doing wrong. I would appreciate if someone
can help me with some sample code.

Ragu
CircuitVision

<<attachment: winmail.dat>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to