Java XML Element Get Value getText(Element element, String tagName)

Here you can find the source of getText(Element element, String tagName)

Description

get Text

License

Apache License

Declaration

public static String getText(Element element, String tagName) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import org.w3c.dom.Element;

public class Main {
    public static String getText(Element element, String tagName) {
        return element.getElementsByTagName(tagName).item(0).getTextContent();
    }//from  ww w. jav  a 2 s.co  m
}

Related

  1. getText(Element element)
  2. getText(Element element)
  3. getText(Element element)
  4. getText(Element element)
  5. getText(Element element, String name)
  6. getText(Element node)
  7. getText(final Element el)
  8. getText(final Element element)
  9. getText(final Element element, final StringBuilder sbuf, final boolean decend)