Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » getting elements
getting elements [message #24001] Tue, 24 June 2003 08:12 Go to next message
Eclipse UserFriend
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 12:14 Go to previous messageGo to next message
Eclipse UserFriend
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 12:18 Go to previous message
Eclipse UserFriend
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 12:14 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33218
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


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: getting elements [message #573459 is a reply to message #24036] Tue, 24 June 2003 12:18 Go to previous message
Eclipse UserFriend
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: Wed Sep 25 03:29:45 GMT 2024

Powered by FUDForum. Page generated in 0.04369 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top