Java Universal Role Playing Engine Version 0.3.9

name.alessiosaltarin.utils.metadata
Class XMLModifier

java.lang.Object
  extended by name.alessiosaltarin.utils.metadata.XMLModifier

public class XMLModifier
extends java.lang.Object

Modify and save nodes in XML files


Constructor Summary
XMLModifier(java.lang.String xmlFilePath)
          Construct a DOM Document reading and parsing xmlFilePath
 
Method Summary
 java.lang.String getNodeValue(java.lang.String tagname)
          Get a specific node value.
static void main(java.lang.String[] args)
          Deprecated.  
 void saveXML()
          Saves a DOM document into the physical XML file.
 void setNodeValue(java.lang.String tagname, java.lang.String newvalue)
          Set a new value for the specific element named with tagname
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLModifier

public XMLModifier(java.lang.String xmlFilePath)
Construct a DOM Document reading and parsing xmlFilePath

Parameters:
xmlFilePath - XML File to modify
Method Detail

getNodeValue

public java.lang.String getNodeValue(java.lang.String tagname)
Get a specific node value. If tag has more than one child, the first one is returned.

Parameters:
tagname -
Returns:
XML Node Value

setNodeValue

public void setNodeValue(java.lang.String tagname,
                         java.lang.String newvalue)
Set a new value for the specific element named with tagname

Parameters:
tagname - The name of the XML node to change
newvalue - New value for the element

saveXML

public void saveXML()
Saves a DOM document into the physical XML file.


main

public static void main(java.lang.String[] args)
Deprecated. 

For test purposes only.

Parameters:
args - arguments

Java Universal Role Playing Engine Version 0.3.9

Copyright ? 2010 http://jurpe.sourceforge.net/ All Rights Reserved.