Mike Boucher wrote:
> Hi folks,
>
> I've been using ecs for all of 2 days now. The archives for this list have
> already helped me work out a few issues I had, so I thank you already.
>
> First, a comment about the org.apache.ecs.factory.DOMFactory class. I made
> a change to the CreateDOM method such that it returned a Document, not a
> NodeList. Maybe it was a strange expectation, but I thought returning a
> single Document made much more sense than returning a list of the children
> of that document.
>
> The only changes I made for this were to the signature and to the last line
> of the method:
>
> //return doc.getChildNodes(); // gone
> return (doc);
>
> This works fine for me right now, but I suspect when the next version of ecs
> comes out, I'll have to change it again. May I suggest that a new method be
> added to DOMFactory which behaves this way?
>
> Now for the question...
>
> I'm using ecs to create XML documents. I have a DOM from one process which
> I have to embed into another DOM. What I tried looked something like this:
>
> XML dataEditorInput = new XML("DataEditorInput", true);
> Element inputParamElement = (Element)paramDoc.getElement());
> dataEditorInput.addElement("ParamTag", inputParamElement);
>
> This doesn't work at all, doesn't even compile. The problem is that the
> Element is really a org.w3c.dom.Element, which is a radically different
> beast from the org.apache.ecs.Element that the addElement method is
> expecting. Is there an easy way to insert an existing org.w3c.dom.Element
> into an org.apache.ecs.XML.XML?
Not currently, your welcome to add and addElement(org.w3c.dom.Element element)
method and submit a patch.
-stephan
--
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]