Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » getting elements
getting elements [message #24001] Tue, 24 June 2003 04:12 Go to next message
Eclipse User
Originally posted by: rsb.ppi.de

Hi there,
I am looking for a method to extract the names of elements.

With
--- Begin Code ---
public static void printElement(XSDSchema xsdSchema) {
System.err.println("--- P R I N T E L E M E N T");
for (Iterator iter = xsdSchema.getElementDeclarations().iterator();
iter.hasNext();
/*no-op */
) {
System.out.println(iter.next());
}
}
--- End Code ---

I recive this output

org.eclipse.xsd.impl.XSDElementDeclarationImpl@c791b9 (element: [xs:element:
null])
(name: b_Element, targetNamespace: http://www.fints.org/composer/)
(value: null, constraint: <unset>, form: qualified, lexicalValue: null)
(nillable: <unset>, disallowedSubstitutions: [],
substitutionGroupExclusions: [], abstract: <unset>, lexicalFinal: [], block:
[])


But I want the element name (here: b_Element), only.

Cheers
Rene
Re: getting elements [message #24036 is a reply to message #24001] Tue, 24 June 2003 08:14 Go to previous messageGo to next message
Eclipse User
Originally posted by: merks.ca.ibm.com

Rene,

Cast the result of next() to XSDElementDeclaration and call getName.


Rene Schrader-Boelsche wrote:

> Hi there,
> I am looking for a method to extract the names of elements.
>
> With
> --- Begin Code ---
> public static void printElement(XSDSchema xsdSchema) {
> System.err.println("--- P R I N T E L E M E N T");
> for (Iterator iter = xsdSchema.getElementDeclarations().iterator();
> iter.hasNext();
> /*no-op */
> ) {
> System.out.println(iter.next());
> }
> }
> --- End Code ---
>
> I recive this output
>
> org.eclipse.xsd.impl.XSDElementDeclarationImpl@c791b9 (element: [xs:element:
> null])
> (name: b_Element, targetNamespace: http://www.fints.org/composer/)
> (value: null, constraint: <unset>, form: qualified, lexicalValue: null)
> (nillable: <unset>, disallowedSubstitutions: [],
> substitutionGroupExclusions: [], abstract: <unset>, lexicalFinal: [], block:
> [])
>
> But I want the element name (here: b_Element), only.
>
> Cheers
> Rene
Re: getting elements [message #24066 is a reply to message #24036] Tue, 24 June 2003 08:18 Go to previous message
Eclipse User
Originally posted by: rene.villa-cossio.com

Ed Merks wrote:
> Cast the result of next() to XSDElementDeclaration and call getName.
>>But I want the element name (here: b_Element), only.

Thanx for the (very) quick help.
Rene
Re: getting elements [message #573419 is a reply to message #24001] Tue, 24 June 2003 08:14 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25919
Registered: July 2009
Senior Member
Rene,

Cast the result of next() to XSDElementDeclaration and call getName.


Rene Schrader-Boelsche wrote:

> Hi there,
> I am looking for a method to extract the names of elements.
>
> With
> --- Begin Code ---
> public static void printElement(XSDSchema xsdSchema) {
> System.err.println("--- P R I N T E L E M E N T");
> for (Iterator iter = xsdSchema.getElementDeclarations().iterator();
> iter.hasNext();
> /*no-op */
> ) {
> System.out.println(iter.next());
> }
> }
> --- End Code ---
>
> I recive this output
>
> org.eclipse.xsd.impl.XSDElementDeclarationImpl@c791b9 (element: [xs:element:
> null])
> (name: b_Element, targetNamespace: http://www.fints.org/composer/)
> (value: null, constraint: <unset>, form: qualified, lexicalValue: null)
> (nillable: <unset>, disallowedSubstitutions: [],
> substitutionGroupExclusions: [], abstract: <unset>, lexicalFinal: [], block:
> [])
>
> But I want the element name (here: b_Element), only.
>
> Cheers
> Rene
Re: getting elements [message #573459 is a reply to message #24036] Tue, 24 June 2003 08:18 Go to previous message
Eclipse User
Originally posted by: rene.villa-cossio.com

Ed Merks wrote:
> Cast the result of next() to XSDElementDeclaration and call getName.
>>But I want the element name (here: b_Element), only.

Thanx for the (very) quick help.
Rene
Previous Topic:getting elements
Next Topic:Help on Adding Identity Constraint to an element
Goto Forum:
  


Current Time: Sat Jul 26 15:23:57 EDT 2014

Powered by FUDForum. Page generated in 0.02581 seconds