Hi All,

I am very new to xmlbeans. I am using xmlbean 2.4.0.

I am use xmlbean fairly well on simple xml files but now I've to deal
with an xml with multiple namespaces. Here is an example

<om:ObservationCollection xmlns:om="http://www.opengis.net/om/1.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:dms="http://dms.ec.gc.ca/schema";
    xsi:schemaLocation="http://dms.ec.gc.ca/schema
    dms-quality_controlled-ncawos-1_1-english.xsd">

        <om:member>
                <om:Observation>
                        <om:result>
                                <dms:name>Shahzad</dms:name>
                        </om:result>
                </om:Observation>
        </om:member>
</om:ObservationCollection>

For the life of me, I can't figure out how to acess the <dms:name>
element in the above xml. 

I don't see a get method for dms:name element. I've searched on this
mail list but didn't see anything that made sense to me. Any help?

I do the following:

ObservationCollectionDocument a =
ObservationCollectionDocument.parse(f);
ObservationCollectionType b = a.getObservationCollection();
ObservationPropertyType[] c = b.getMemberArray();
For (ObservationPropertyType obs:c) {
        ObservationType obsType = obs.getObservation();
        //now what do I do?
        //I expected that I could do something like obsType.getResult()
or something like that but
        //I can't.
}

Any help will be appreciated. I don't wanna have to use xerces to parse
my xml since I am already using xmlbean to parse other xml files in the
project. 


thanks

Shahzad Qureshi

Reply via email to