Category: Width value

  • Apache Batik, Element ID, Width value

    Using Apache Batik & need to get the ID of an element? Try doing this: // Get ID of first g element NodeList gElements = symbolSVGRoot.getElementsByTagNameNS(svgNS, “g”); Element firstGElement = (Element)gElements.item(0); String gID = firstGElement.getAttribute(“id”); Need to get the width value of the svg element? Try doing this: String widthAttribute = symbolSVGRoot.getAttribute(“width”);If the value has…