Ruang penulis
SEBUAH JURNAL TENTANG TEKNOLOGI

Belajar hal baru.
Tulis. Bagikan.

Ruang untuk merangkai pengetahuan, satu baris kode setiap hari.
Temukan tutorial, ide, dan catatan dari perjalanan belajar.

1914 catatan & terus bertumbuh
PILIHAN EDITOR
Java

Memahami Java Stream: olah koleksi dengan lebih ringkas

Pelajari alur filter, map, dan collect untuk mengolah data Java dengan kode yang mudah dibaca.

D Tim Diary Coding · 1 menit baca
UNTUK RASA INGIN TAHUMU

Catatan terbaru.

JDOM / CATATAN</>
JDOM04 Mei 2009

How do I remove an attribute from XML element in JDOM?

The following example shows you how to remove attributes from an XML element. We will remove attribute named userid from the <row> element. To remove an attribute you can call the removeAttribute(String name) method of the Element object. package org.kodejava.jdom; import org.jdom2.Document; import org.jdom2.Element; import org.jdom2.input.SAXBuilder; import org.jdom2.output.Format; import org.jdom2.output.XMLOutputter; import java.io.File; public class JDOMRemoveAttribute […...

Wayan · 2 menit baca
JDOM / CATATAN</>
JDOM03 Mei 2009

How do I remove an element from XML document in JDOM?

This example show you how to remove an element from XML document. In the code snippet below we start by loading an XML document and display its original contents. After that we find the element <row>, and remove the <address> element from it. To get the first child we are using the getChild() method from […]

Wayan · 3 menit baca
JDOM / CATATAN</>
JDOM02 Mei 2009

How do I add attributes to an XML elements in JDOM?

The program below will show you how to add attributes to an XML elements. Using JDOM library this can be easily done by calling the Element‘s setAttribute(String name, String value) method. package org.kodejava.jdom; import org.jdom2.Document; import org.jdom2.Element; import org.jdom2.output.Format; import org.jdom2.output.XMLOutputter; public class JDOMAddAttribute { public static void main(String[] args) { Document doc = new […]

Wayan · 2 menit baca
JDOM / CATATAN</>
JDOM28 Apr 2009

How do I create an XML document using JDOM?

In this small program you can see how to use JDOM to create a simple xml file. Below you’ll see how to create elements of the xml document, set some text for the element. After that you can see how to use the XMLOutputter class to write the JDOM document into file and display it […]

Wayan · 3 menit baca
JDOM / CATATAN</>
JDOM28 Apr 2009

How do I create a Document object in JDOM?

The following example show you how to create a simple Document object in JDOM. We can create a new document directly by creating a new instance of the Document class, for additional information we can pass an Element as an argument. To create a Document from an existing XML file we can use the SAXBuilder. […]

Wayan · 2 menit baca
SWING / CATATAN</>
Swing24 Apr 2009

How do I get the items of a JList components?

In this example you can see how we can read the items of a JList component. We also obtain the size or the number of items in the JList components. This can be done by calling JList‘s getModel() method which return a ListModel object. From the ListModel we can get the items size, and we […]

Wayan · 2 menit baca

Pengetahuan tumbuh ketika dibagikan.

Simpan rasa ingin tahu. Selalu ada hal baru untuk dipelajari.

Jelajahi catatan ↗
Putu Adi Guna Permana
TENTANG PENULIS

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Penulis dan pendiri Diary Coding — berbagi catatan, tutorial, dan pengalaman seputar pemrograman untuk siapa pun yang ingin terus belajar.