You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2003/07/14 14:48:11 UTC
DO NOT REPLY [Bug 21568] New: -
DocumentLS.saveXML cannot handle Nodes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21568>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21568
DocumentLS.saveXML cannot handle Nodes
Summary: DocumentLS.saveXML cannot handle Nodes
Product: Xerces2-J
Version: 2.4.0
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: DOM
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: mkopp@ftisoft.at
This function only works if the parameter is null.
if you look at the implementation in CoreDocumentImpl.java (see my comment):
public String saveXML(Node node)
throws DOMException
{
//mkopp: this line can never work if the node is not null, because the
// getDocument method of a document always returns null!!!!!!!
if(node != null && getOwnerDocument() != node.getOwnerDocument())
{
String s = DOMMessageFormatter.formatMessage
("http://www.w3.org/dom/DOMTR", "WRONG_DOCUMENT_ERR", null);
throw new DOMException((short)4, s);
}
DOMImplementationLS domimplementationls = (DOMImplementationLS)
DOMImplementationImpl.getDOMImplementation();
DOMWriter domwriter = domimplementationls.createDOMWriter();
if(node == null)
node = this;
return domwriter.writeToString(node);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org