[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-j-user
Subject:    Validating a DOM Element
From:       chodnik <wxwidgets () o2 ! pl>
Date:       2009-07-15 17:59:31
Message-ID: 24502937.post () talk ! nabble ! com
[Download RAW message or body]


Hi,
I have some code:
try {
			validator
					.validate(new DOMSource(document), new DOMResult(document));
		} catch (SAXException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		ElementPSVI elementPSVI = (ElementPSVI) element;
		XSElementDeclaration declaration = elementPSVI.getElementDeclaration();

It works fine but I've found on this forum that I can validate only a
selected element. I've tryed to change to:
validator
					.validate(new DOMSource(element), new DOMResult(element));
But this time the declaration variable is always null. I don't know why.
Should I set any parameters to have PSVI?
Thank for the reply.
-- 
View this message in context: http://www.nabble.com/Validating-a-DOM-Element-tp24502937p24502937.html
Sent from the Xerces - J - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic