Babar Abbas wrote:
Hi Michael and Klaus!
As stated by you there is a difference b/w Prolog
and Processing Instruction:
Prolog:
An XML document starts with a Prolog, The prolog is used to
signal the beginning of the XML data, describe its character encoding
method, and provide some other configuration hints to the XML parser and
application.
The prolog consists of an optional XML declaration, which
can be ommitted, and the document can still be well formed.
"In my case I want to have 2 prolog elements, one is the
<?xml version="1.0" encoding="UTF-8" ?>
and the other one is
<?qbxml version="2.0" ?> "
> [...]
hd.processingInstruction("qbxml version","2.0");
can klaus and Michael help, I think enough debate till now,
which method of which class should I call, there is an OutputFormat
class, but I have seen its functions, couldn't be of much help.
any help will be appreciated. I came across this
page, which was of much help in explaining how to generate, XML with SAX
and XERCES.
http://www.javazoom.net/services/newsletter/xmlgeneration.html
Hi,
try
ProcessingInstruction pi =
document.createProcessingInstruction ("qbxml", "version=\"2.0\"");
instead.
While your processing instruction has an attribute-like syntax, this is not part
of the XML specification. The XML specification allows any text behind the
target (except the end marker of the processing instruction of course).
Therefore, there is no support for attribute-like content for processing
instructions in all toolkits I know (including DOM and SAX) and you have to
create this by hand, like I did it in the statement above.
Hope that helps.
Regards,
Klaus
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]