- From: DESEYNE Jacques <jacques.deseyne@swift.com>
- Date: Tue, 05 Jun 2001 10:58:18 +0200
- To: Prakash Bande <prakash.bande@sdrc.com>, XmlSchema-Dev <xmlschema-dev@w3.org>
Prakash Bande wrote: > > Hi, > This may appear a silly quesion. > I want to know which dom interface will give me the attribute of a DOM_Element/DOM_Node. > The DOM_Node::getAttributes() gives me a DOM_NamedNodeMap which has the interface only to get named items > DOM_NamedNodeMap::getNamedItem(). But I want a list of all the attributes which use them for DOM_Node::getNodeValue(), in a loop. I suppose your question is not related to using the DOM interface, e.g. using a loop by ordinals like in the following; if so, is there a Schema-related issue I must have missed ? Best regards, ----%<----%<----%<---- // Java code snippet -- currentElement is a DOM Element NamedNodeMap nnm = currentElement.getAttributes(); if (nnm != null) { for (int i = 0; i < nnm.getLength(); i++ ) { Node aNode = nnm.item(i); System.out.println("Attribute " + ((Attr) aNode).getName() + " Value: [" + ((Attr) aNode).getValue() + "]"); } } ----%<----%<----%<---- > > Thanks in advance > > Prakash Reddy Bande > email Prakash.Bande@sdrc.com > Ext.124,Ph.+91-2139-33666 > Structural Dynamics Research Corporation > Product Groups - India > > > > > > -- Jacques Deseyne SWIFTAlliance WebStation Interfaces Solutions Development and Maintenance S.W.I.F.T. s.c. Tel: +32 2 655 45 87 Mobile: +32 2 478 32 32 00 http://becqw460.swift.com This e-mail and any attachments thereto may contain information that is confidential and/or proprietary and is intended for the sole use of the recipient(s) named above. It is not intended to create or affect any contractual arrangements between the parties. If you have received this e-mail by mistake, please notify the sender and delete it immediately. Thank you for your cooperation.
Received on Tuesday, 5 June 2001 05:00:41 UTC