Java XML Node Parse parseSpelling(Node spelling)

Here you can find the source of parseSpelling(Node spelling)

Description

parse Spelling

License

Open Source License

Declaration

private static String parseSpelling(Node spelling) 

Method Source Code

//package com.java2s;
/*/* w w  w .j  a  v  a2  s .c o m*/
 * $Id$
 *
 * Copyright 1998,1999,2000,2001 by Rockhopper Technologies, Inc.,
 * 75 Trueman Ave., Haddonfield, New Jersey, 08033-2529, U.S.A.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of Rockhopper Technologies, Inc. ("Confidential Information").  You
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement
 * you entered into with RTI.
 */

import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

public class Main {
    private static String parseSpelling(Node spelling) {
        StringBuilder sb = new StringBuilder();
        NodeList sc = spelling.getChildNodes();
        int len = sc.getLength();
        for (int i = 0; i < len; i++) {
            Node nn = sc.item(i);
            if (nn.getNodeName().equalsIgnoreCase("degree")) {
                sb.append(nn.getTextContent());
                sb.append(' ');
            }
        }
        return sb.toString();
    }
}

Related

  1. parseOptionString(Node node)
  2. parsePairFirst(Node node)
  3. parseProperties(Node doc)
  4. parseProtoypes(Node module, Node iFace, PrintWriter out)
  5. parsePseudoHTML(Node e, StringBuffer html)
  6. parseStringIdList(Node e)
  7. parseStringList(Node node)