Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » How to: Convert a org.apache.xerces.dom Node to org.eclipse.wst.html.core.internal.document Node
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
Eclipse UserFriend
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 #202404 is a reply to message #202316] Tue, 16 October 2007 21:32 Go to previous messageGo to next message
David Williams is currently offline David WilliamsFriend
Messages: 722
Registered: July 2009
Senior Member
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
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
Eclipse UserFriend
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
Previous Topic:Design view of WSDL doesn't link to soap fault type
Next Topic:Preserving text editor caret position
Goto Forum:
  


Current Time: Thu Mar 28 23:39:35 GMT 2024

Powered by FUDForum. Page generated in 0.01966 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top