How to: Convert a org.apache.xerces.dom Node to org.eclipse.wst.html.core.internal.document Node [message #202316] |
Tue, 16 October 2007 09:40 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: ranjeev.backbase.com
Hello Guys,
I am having a node that is type
(org.eclipse.wst.html.core.internal.document.ElementStyleImp l), I wish
to import this into org.eclipse.wst.html.core.internal.document, using
the code below:
Node importedNode = domModel.getDocument().importNode(newNode, true);
//domModel is of type
org.eclipse.wst.xml.core.internal.provisional.document.IDOMM odel
// and newNode is of type org.apache.xerces.dom.ElementStyleImpl, which
// giving me class cast exception!
Is there a way to convert a a org.apache.xerces.dom Node to
org.eclipse.wst.html.core.internal.document Node???
Thanks
Ranjeev
|
|
|
|
Re: How to: Convert a org.apache.xerces.dom Node to org.eclipse.wst.html.core.internal.document Node [message #202592 is a reply to message #202404] |
Thu, 18 October 2007 10:37 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: ranjeev.backbase.com
Thanks for your reply!
I changed my implementation, earlier I had two different types..
IDOMElement from wst and Element (from xerces), now I use IDOMElement
and it solved my problem.
David Williams wrote:
> On Tue, 16 Oct 2007 05:40:16 -0400, Ranjeev <ranjeev@backbase.com> wrote:
>
>> // and newNode is of type org.apache.xerces.dom.ElementStyleImpl, which // giving me class cast exception!
>>
>> Is there a way to convert a a org.apache.xerces.dom Node to
>> org.eclipse.wst.html.core.internal.document Node???
>>
>
> Sounds like a bug. I'm pretty sure I've heard of people doing this before, so you
> might have to provide some unit-test-like code to demonstrate the problem with your
> particular input.
>
> But, I don't actually see an ElementStyleImpl in org.apache.xerces.dom. So ... either a typo? Or you have some
> non-standard version of org.apache.xerces.dom?
>
>
> Thanks
|
|
|
Powered by
FUDForum. Page generated in 0.03599 seconds