Java XML Attribute Parse parseString(String xmlAttributeValue, String invalidValue)

Here you can find the source of parseString(String xmlAttributeValue, String invalidValue)

Description

parse String

License

Apache License

Declaration

public static String parseString(String xmlAttributeValue,
            String invalidValue) 

Method Source Code

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

import org.w3c.dom.*;

public class Main {
    public static String parseString(Node xmlAttribute, String invalidValue) {
        if (xmlAttribute == null)
            return invalidValue;

        return xmlAttribute.getNodeValue();
    }//from www .j a  v  a  2 s  .co  m

    public static String parseString(String xmlAttributeValue,
            String invalidValue) {
        if (xmlAttributeValue == null)
            return invalidValue;

        return xmlAttributeValue;
    }
}

Related

  1. parseElementAttributes(Element element)
  2. parseFloat(Node xmlAttribute, float invalidValue)
  3. parseFloat(String attributeName, NamedNodeMap map)
  4. parseProtoypes(Node module, Node iFace, PrintWriter out, boolean onlyAttributes)
  5. parseString(final Element parent, final String attrName)