Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the source code for org.w3c.dom.Node available anywhere?

Tags:

java

xml

A am looking for the source code of org.w3c.dom.Node and especialy the setTextContent.

But whatever I put into Google all I get are JavaDoc or other extracts but never the full source code.

I would not have thought that packages starting with org. would be prohibitory. So is there any place where one can look at the actual source or was I mistaken and the code is indeed secret?

like image 217
Martin Avatar asked Dec 04 '22 20:12

Martin


1 Answers

org.w3c.dom.Node is an interface! Therefore there isn't anything in the source that you can't see in the JavaDoc, it's only the method definitions.

What you might want to look at is the concrete Node implementation that you get from your DOM implementation:

Node myNode = getNodeFromSomewhere();
System.out.println("Node interface is implemented by " + myNode.getClass());
like image 159
Joachim Sauer Avatar answered Dec 26 '22 06:12

Joachim Sauer