Java XML Element Text getContentText(Element element)

Here you can find the source of getContentText(Element element)

Description

get Content Text

License

Open Source License

Declaration

public static String getContentText(Element element) 

Method Source Code

//package com.java2s;
/*/*from   ww  w  .j  a v a2  s .c  om*/
 * JBoss, Home of Professional Open Source
 * Copyright 2005, JBoss Inc., and individual contributors as indicated
 * by the @authors tag. See the copyright.txt in the distribution for a
 * full listing of individual contributors.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */

import org.w3c.dom.Element;

public class Main {
    public static String getContentText(Element element) {
        return element.getTextContent();
    }
}

Related

  1. getContent(Element e)
  2. getContent(Element element)
  3. getContent(Element element)
  4. getContent(Element element)
  5. getContentFromElement(Element element, String namespaceURI, String localName)
  6. getContentText(Element elementNode)
  7. getElementText(Element elem)
  8. getElementText(Element elem)
  9. getElementText(Element elem, boolean mandatory)