You have to compille the program using Xerce's librarys, giving to the
compiler the right path: javac -classpath (Xerce's path library)
tibot wrote:
>
> Hello,
>
> It seems I have the same problem but I don't see what you have done to
> make it work.
>
> Thank you
>
>
>
> Lastdot wrote:
>>
>> Yes.....!!! That was the reason, the thing is that i´ve already tried to
>> compille the program giving to the compiler the Xerce's classpath,but i
>> wasn't giving the right jar's name. This time to make sure i gave to it
>> as parameter every packages and it worked!!!!
>> Thank you very much indeed!!!!
>>
>> Michael Glavassevich wrote:
>>>
>>> Lastdot <[EMAIL PROTECTED]> wrote on 12/12/2006 07:00:00 AM:
>>>
>>>> Hi,
>>>> When i try to serialize a DOM document to an output stream i always get
>>> the
>>>> same error: when i create a DOMImplementatiosLS object it gets a null
>>> value
>>>> so, when i try to use this object to get a LSSerializer object i get a
>>> null
>>>> pointer exception.
>>>> I've tried everything, and i don´t know what to do....
>>>> Here is a snippet of the code, in fact, it´s copied from Xerces
>>>> official
>>>> page:
>>>>
>>>>
>>>>
>>>> import org.w3c.dom.bootstrap.DOMImplementationRegistry;
>>>> import org.w3c.dom.Document;
>>>> import org.w3c.dom.ls.DOMImplementationLS;
>>>> import org.w3c.dom.ls.LSSerializer;
>>>>
>>>> DOMImplementationRegistry registry =
>>>> DOMImplementationRegistry.newInstance();
>>>> (1) DOMImplementation domImpl = registry.getDOMImplementation("LS");
>>>> (2) DOMImplementationLS implLS = (DOMImplementationLS)domImpl;
>>>> LSSerializer writer = implLS.createLSSerializer();
>>>>
>>>>
>>>> (1) At this point i get an object with a null value
>>>> (2) Here a null pointer exception
>>>>
>>>> Any help would be appreciated, i´m stuck and desperate....
>>>
>>> Probably a bug in Java 5. This works with the Apache version. Are you
>>> sure
>>> you were actually using Xerces when you tried this?
>>>
>>>> --
>>>> View this message in context: http://www.nabble.com/Problems-with-
>>>> Serialization-tf2807098.html#a7831858
>>>> Sent from the Xerces - J - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>> Michael Glavassevich
>>> XML Parser Development
>>> IBM Toronto Lab
>>> E-mail: [EMAIL PROTECTED]
>>> E-mail: [EMAIL PROTECTED]
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Problems-with-Serialization-tf2807098.html#a8639147
Sent from the Xerces - J - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]