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?
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?