Reload DOM with signed sections

A

andrew53

Is there a way to reload a DOM which contains signed sections.
Something like:

string OriginalXML = thisXDocument.DOM.xml;
//do something here with thisXDocument.DOM
//...
//restore previous state
IXMLDOMDocument d = thisXDocument.CreateDOM();
d.loadXML(OriginalXML);
thisXDocument.DOM.replaceChild(
d.documentElement,
thisXDocument.DOM.documentElement);
//supposed to be restored to original state here

The contents of all the data fields are preserved, but there are two
problems with signatures:
1. If the document is not signed, the signature buttons on the form
disappear and clicking the signature button on the toolbar generates this:
"The XPath points to a different field or group than it did when the form was
opened." What am I missing to prevent it from happening?
2. If the document is signed, no changes can be made (throws error in the
"do something" section. Is there a way to store document state, remove
signatures, make changes to the document, then restore signatures?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top