[Zope] XMLDocument question, DOM API

Ibaņez Palomar Juan David al028823@alumail.uji.es
Fri, 21 Jan 2000 16:32:45 +0100 (NFT)


> 
> 
> Hi all,
> 
> I'm trying to do something very simple with XMLDocument.
> I want to extend the FAQ example described by Amos in
> http://www.xml.com/pub/2000/01/xmlrpc/index.html
> 

Ops!, wrong URL, it's http://www.xml.com/pub/1999/12/zope/index.html
Sorry


> I've wrote an external method called "addEntry":
> 
>   def addEntry(self, REQUEST):
>     entry = self.getOwnerDocument().createElement('entry')
>     self.appendChild(entry)
> 
> What I want to do with it is to add a new entry to the FAQ.
> 
> 
> When I call "addEntry" with the URL http://mysite/myfolder/FAQ/0/addEntry
> I get the error:
> 
>   Error Type: WrongDocumentException
>   Error Value: 
> 
> the traceback is:
> 
> 
> Traceback (innermost last):
>   File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 214, in publish_module
>   File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 179, in publish
>   File /usr/lib/zope/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook
>     (Object: Manageable)
>   File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 165, in publish
>   File /usr/lib/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply
>     (Object: addEntry)
>   File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 102, in call_object
>     (Object: addEntry)
>   File /usr/lib/zope/lib/python/Products/ExternalMethod/ExternalMethod.py, line 248, in __call__
>     (Object: addEntry)
>     (Info: ((<Element instance at 85118e0>, ...), {}, None))
>     (Object: Manageable)
>   File /usr/lib/zope/lib/python/Products/XMLDocument/Node.py, line 431, in appendChild
>     (Object: Manageable)
> WrongDocumentException: (see above)
> 
> 
> I've looked at the mail archives, the XMLDocument sources and made
> lots of different tests without success.
> 
> 
> Please, can anybody help me? what am I doing wrong?
> which is the right code to do this?
> 
> 
> Thanks a lot,
> David
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
> 
>