Title: NEED XMLBEANS HELP!!!

People do exist on this mailing list J

 

I will try to address the second part of your email.

 

Have you tried calling the validate method with an error listener after you parse in the instance? I think the code you have should work (and I’m saying that without seeing the schema you have) in theory. The thing that I’m guessing is that the instance is somehow not valid, so OPLAN element is not recognized as such because it’s in a different namespace than the schema requires it to be in (I’m assuming that the NPE occurs on oplan.getName() ).

 

Sorry if this is not helpful, that’s the best I can do without looking at the actual schema.

 


From: Green, Jason M. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 28, 2005 11:01 AM
To: dev@xmlbeans.apache.org
Subject: NEED XMLBEANS HELP!!!

 

If anyone is out there listening….

I just got an extensive xml schema that I used xmlbeans to create a jar with.  The large number of files confuses me, but that isn't the basis of my email.

First,
I have two sections of my schema that are groups and not the complex/simple types.  How do I access them??  All I see are the xsb files that are of the same name as the group, but no class files.

Second,
  I try to parse the xml doc w/ a portion that I thought worked, but when I run it, I get a null pointer exception.
This is the code:
PlanningContextHeaderType planContext = PlanningContextHeaderType.Factory.parse(inputFile);
            PlanningContextHeaderType.OPLAN oplan = planContext.getOPLAN();
            System.out.println(oplan.getName());
And here is the abbreviated xml:

<?xml version="1.0" encoding="UTF-8"?>
<MDADocument>
        <defenseDesignDocument>
        <OPLAN>
                <planId>9151314447111817754</planId>
                <name>Venezuela</name>
        </OPLAN>
        </defenseDesignDocument>
</MDADocument>

I'll keep it at that for right now, but I have a couple more questions but I won't bother to write it until I hear back that people actually exist in this mailing list.

Thanks,
Jason Green

Reply via email to