thanks it worked.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, March 16, 2001 10:32 AM
To: [EMAIL PROTECTED]
Subject: Re: createProcessingInstruction



"Document.createProcessingInstruction()" creates a PI and return it. It's
not added into the document automatically. You need to call some function
to do so (Document.insertBefore() or Document.appendChild()). For example:

    ProcessingInstruction pi = document.createProcessingInstruction
("xmlagain", "version=\"1.0\" encoding=\"UTF-8\"");

    // use one of the following two ways:
    // 1. either to append your PI at the end of the child list
    document.appendChild(pi);

    // 2. or to put it as the first child
    Node firstChild = document.getFirstChild();
    document.insertBefore(pi, firstChild);

HTH,
Sandy Gao
Software Developer, IBM Canada
(1-416) 448-3255
[EMAIL PROTECTED]



 

                    "Consultant, Rajeswari"

                    <[EMAIL PROTECTED]       To:
[EMAIL PROTECTED]                                      
                    ctive.com>                     cc:

                                                   Subject:
createProcessingInstruction                                  
                    03/16/2001 10:05 AM

                    Please respond to

                    xerces-j-user

 

 




Hi,

I want to create the following instruction

<?xmlagain version="1.0" encoding="UTF-8" ?>

How do I use the method Document.createProcessingInstruction to create
this.

I tried
doc.createProcessingInstruction("xmlagain", "version=\"1.0\"
encoding=\"UTF-8\"");

It does'nt seem to work.

Thanks
Raji

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






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

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

Reply via email to