You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "rafiq ahmad (JIRA)" <xm...@xml.apache.org> on 2006/03/02 18:27:50 UTC
[jira] Resolved: (XMLBEANS-249) Validation of an xml file (whose
root node is unknown) says file is invalid eventhough file is valid
[ http://issues.apache.org/jira/browse/XMLBEANS-249?page=all ]
rafiq ahmad resolved XMLBEANS-249:
----------------------------------
Resolution: Duplicate
Another task created XMLBeans-250 due to server unavailable problem
> Validation of an xml file (whose root node is unknown) says file is invalid eventhough file is valid
> ----------------------------------------------------------------------------------------------------
>
> Key: XMLBEANS-249
> URL: http://issues.apache.org/jira/browse/XMLBEANS-249
> Project: XMLBeans
> Type: Bug
> Components: Validator
> Versions: Version 2
> Environment: Windows XP
> Reporter: rafiq ahmad
> Fix For: Version 2
>
> I am trying to validate an xml file whose root node is unknown. So I am using the following code to parse and validate but validation fails.
> XMLObject xmlObject = XmlObject.Factory.parse(new FileReader(file));
> boolean isValid = xmlObject.validate(); //isValid becomes false eventhough file is valid
> When I looked at closely, I notice xmlObject is not pointing to the root document object (In my case ReturnDataDocument since ReturnData is the root node of xml) but pointing to XmlAnyTypeImpl.
> When I use the specific object , it works.
> ReturnDataDocument xmlObject = ReturnDataDocument .Factory.parse(new FileReader(file));
> boolean isValid = xmlObject.validate(); //isValid is true
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org