DO NOT REPLY [Bug 41256] New: - NullPointer Exception in at org.apache.xml.utils.TreeWalker.dispatachChars
| Newsgroups | gmane.text.xml.commons.devel |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41256>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41256
Summary: NullPointer Exception in at
org.apache.xml.utils.TreeWalker.dispatachChars
Product: XmlCommons
Version: 1.x
Platform: Other
OS/Version: Windows XP
Status: NEW
Severity: blocker
Priority: P2
Component: DOM
AssignedTo: [email protected]
ReportedBy: [email protected]
I am not sure whether I reported this bug under right component, so please
guide me to the correct one, if I am wrong.
Bug is like this.
I am getting this error while running my application.
I really dont have any clue why this is happening?
Can somebody please help me, as I really can not proceed with my application?
Here is the code which I am using for creating doc from string and creating
string from doc.
public static Document getDocFromString(String xmlString){
Document doc = null;
try
{
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
doc = db.parse(new InputSource(new StringReader(xmlString)));
}
catch( Exception Ex ){
Ex.printStackTrace();
try {
throw Ex;
} catch (Exception ef) {}
}
return doc;
}
// convert a Document Object to a String
public static String documentToString(Document pDoc) {
StringWriter sw = new StringWriter();
try {
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer();
transformer.transform(new DOMSource(pDoc), new StreamResult(sw));
} catch (Exception e) {
e.printStackTrace();
try {
throw e;
} catch (Exception ef) {}
}
return sw.toString();
}
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.