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:24:59 UTC

[jira] Created: (XMLBEANS-250) Validation fails on an xml whose root node is unknown

Validation fails on an xml whose root node is unknown
-----------------------------------------------------

         Key: XMLBEANS-250
         URL: http://issues.apache.org/jira/browse/XMLBEANS-250
     Project: XMLBeans
        Type: Bug
  Components: Validator  
    Versions: Version 2    
    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


[jira] Resolved: (XMLBEANS-250) Validation fails on an xml whose root node is unknown

Posted by "Jacob Danner (JIRA)" <xm...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XMLBEANS-250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacob Danner resolved XMLBEANS-250.
-----------------------------------

    Resolution: Cannot Reproduce

Unable to reproduce this using information given from bug. If this is still an issue for you from this scenario, please include a test case and/or include information from error listener in xmloptions.setErrorListener to see detailed information about the issue.

> Validation fails on an xml whose root node is unknown
> -----------------------------------------------------
>
>                 Key: XMLBEANS-250
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-250
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: Validator
>    Affects Versions: Version 2
>            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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org