|
My test was wrong
! I used a loop to print all values, and everything was null, but there was an
if that shown only the element nodes, and the values are in the text nodes… It will work fine
! thanks max ! -----Mensagem
original----- According to specification nodeValue is null for elements. Hello,
config.setProperty("http://apache.org/xml/properties/internal/grammar-pool",grammarPool);
DOMParser parser = new DOMParser(config);
parser.setFeature("http://xml.org/sax/features/validation",true);
parser.setFeature("http://apache.org/xml/features/validation/schema",true);
parser.parse(filename); doc =
parser.getDocument();
org.apache.xerces.impl.xs.psvi.XSModel model = grammarPool.toXSModel();
parser.setFeature("http://xml.org/sax/features/validation",true);
parser.setFeature("http://apache.org/xml/features/validation/schema",true);
parser.setProperty("http://apache.org/xml/properties/dom/document-class-name","org.apache.xerces.dom.PSVIDocumentImpl");
parser.parse(filename);
doc = parser.getDocument();
ElementPSVI
elem = (ElementPSVI) node; System.out.println(node.getNodeName()
+ " : "+node.getNodeValue()); // the output is always : “ node name :
null”; Sorry to keep bothering you but I�ve read all the FAQ and went trought
the docs but I still haven�t found a way to solve this. -- Maksym Kovalenko |
Title:
- Node Info and PSVI in one parser Rubens Del Monte
- Re: Node Info and PSVI in one parser Maksym Kovalenko
- RES: Node Info and PSVI in one parser Rubens Del Monte
