Here you can find the source of getNodeValueAsLong(Node node)
Parameter | Description |
---|---|
node | Description of the Parameter |
public final static long getNodeValueAsLong(Node node) throws DOMException
//package com.java2s; /**/* www . j a v a 2 s . c om*/ * Copyright (c) 1999-2007, Fiorano Software Technologies Pvt. Ltd. and affiliates. * Copyright (c) 2008-2015, Fiorano Software Pte. Ltd. and affiliates. * * All rights reserved. * * This software is the confidential and proprietary information * of Fiorano Software ("Confidential Information"). You * shall not disclose such Confidential Information and shall use * it only in accordance with the terms of the license agreement * enclosed with this product or entered into with Fiorano. */ import org.w3c.dom.*; public class Main { /** * Gets the node value as long. * *@param node Description of the Parameter *@return The nodeValueAsLong value *@exception DOMException Description of the Exception */ public final static long getNodeValueAsLong(Node node) throws DOMException { if (node != null) { node = node.getFirstChild(); if (node != null) return Long.parseLong(node.getNodeValue()); } return -1; } }