Hi, See my reply below.
> -----Original Message----- > The C implementation of AXIOM is different form that of Java. Hence, it is > not easy, if not impossible to implement the clone method. This is mainly > because of hte linked list model that we have in the C implementation. > > The workaround for this would be to serialize the tree and use that string > to create the new tree. This would allow for reuing the same content. > Else, you have to adopt the method used in echo sample, where you recreate > the payload with different parameters. This seems acceptable, if not ideal. However there is one problem with this -- I am not guaranteed that the namespaces of the current node will be defined in that node, they may be defined in some unspecified parent node. So the only solution here appears to be to serialize/deserialize the entire document. If I was to do this, how do I then find the current node to pass on? Are you guaranteed that the new tree will be parsed in the same order? I.e. if I was to search the tree from the root to find the exact path to the current node, and then follow the same path in the new document, would I reach the same node? Would this be an acceptable way of doing things? Finally, is it guaranteed that the node returned from the send_receive methods will always have a document? I.e. Can I guarantee that I can always get the document root by doing: axiom_document_t* doc = axiom_node_get_document(node, env); axiom_node_t* root = axiom_document_get_root_element(doc, env); Or should I simply traverse from the current node up to the root by calling axiom_node_get_parent 'til it returns NULL? Thanks, Jamie > > Clone method required for axiom_node > > ------------------------------------ > > > > Key: AXIS2C-677 > > URL: https://issues.apache.org/jira/browse/AXIS2C-677 > > Project: Axis2-C > > Issue Type: Bug > > Components: xml/om > > Reporter: Jamie Lyon > > > > There is no clone method for axiom_node in the current implementation of > axiom/c, it should have one as the axiom/java version does. > > Without a clone method, there is no easy way to alter a tree without > affecting the original. > > -- > This message is automatically generated by JIRA. > - > You can reply to this email to add a comment to the issue online. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
