Hi All,
I am very new to XML and DOM . I need to edit a xml file which has following contents
<?xml version="1.0" encoding="UTF-8"?>
<DAOServices>
<DAOService name="default">
<SimpleDMDBStrategy name="default">
<URL>
jdbcracle:thin:@100.101.02.03:1521:TIGER</URL>
<UserName>USER1</UserName>
<Password>PASSWORD1</Password>
<DriverName>oracle.jdbc.driver.OracleDriver</DriverName>
</SimpleDMDBStrategy>
</DAOService>
</DAOServices>
here i wish to change the value of UserName to USER2 and similarly value of Password to PASSWORD2 as below
<?xml version="1.0" encoding="UTF-8"?>
<DAOServices>
<DAOService name="default">
<SimpleDMDBStrategy name="default">
<URL>jdbc:oracle:thin:@100.101.02.03:1521:TIGER</URL>
<UserName>USER2</UserName>
<Password>PASSWORD2</Password>
<DriverName>oracle.jdbc.driver.OracleDriver</DriverName>
</SimpleDMDBStrategy>
</DAOService>
</DAOServices>
Here i found package org.w3c.dom very uncomfortable..at the same time i came to know JDOM is now almost obsolete. During my attempt i faced problem
saying class cast exception com.sun.org.apache.xerces.internal.dom.DeferredTextImpl...
Please suggest me approach to tackle such type of problem.