liinaa

Greenhorn
+ Follow
since Sep 21, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by liinaa

Can someone kindly tell me how do i use an Entity Resolver interface. I tried using it, but i got an Exception -
org.xml.sax.SAXParseException: File "file:///C:/samples/book.dtd" not found.
My current working directory is C:/samples
and The DOCTYPE Statement in the xml file is
<!DOCTYPE main SYSTEM "book.dtd">
I want to place the book.xml and book.dtd files in some other directory.
the following is the code implemnting the resolveEntity method.
public InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws SAXException, IOException
{
if (systemId.equals("book.dtd"))
{
try
{
return new InputSource(file:///Some directory/book.xml");
}
catch(Exception e)
{
System.out.println("EXCEPTION = "+e);
return null;
}
}
else
{
return null;
}
}
Where have i gone wrong??
I am using a xerces-1_2_2 parser.
I have included my External Dtd Reference in my xml file as
<!DOCTYPE Store SYSTEM "Store.dtd">
This gives me an error saying that the dtd file is not found in file:///...path of my xml file when i run it through command promt.And when i use Apache Tomacat, it closes the window (terminates the application)
But when i write
<!DOCTYPE Store SYSTEM "file:///C:/Store.dtd"> it does not throw any error but proceeds normally..
Why is this so??? All examples on the web don't mention file:/// part.

Can someone please help me out. It is very urgent.
Thanks.
I want to insert and retrieve a java class object into the database.Is this possible.Can setObject and getObject jdbc methods be used to achieve this and if so, what should be the corressponding datatype in the database.
If there's some other way, kindly pass on the information
Its urgent and any help would be appreciated
Thanks in advance!
I am using a xerces parser DOM API. I need to handle xml comments while parsing and building an xml file. while building the xml file, i need to insert an xml comment node...
Can someone help me out with this??
Thanks
Dear Ajith Kallambella,
Thank you once again.

--liinaa