Vasudhaiv Naresh

Ranch Hand
+ Follow
since May 13, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vasudhaiv Naresh

To be precise what i'm looking for a DOM inspector API.
Is there any such API available?
What I'm looking for is an application where in, if I do a click on any field of some web page, I would want to get the information of how it has been defined in the DOM.
i.e., For ex: if I click on some "button", what i'm looking for is the HTML tag which describes this element, i.e, "<input type="button"...>" in this case.
Hi,
I was just wondering if there's any way where I can read the HTML tags associated with an element.
My requirement is as follows:
1. I have a web page.
2. I would click on some element in the web page, say a text field.
3. I would want to retrieve the HTML definition of the element.

I know there are tools like FireBug using which we can manually retrieve the information. I'm looking for someway where I write a script which lets me retrieve the tag info on click.

Thanks,
Naresh
Naresh

The File must be on the path of the classloader, so it should work anywhere from the root up along your com package structure.



I've tried putting the "resources" directory at the level parallel to "com". Doing a getResourceAsStream("/resources/myproperties.properties") was giving me "null". But when I tried putting this at my package level, i.e, where the main class is, and doing a getResourceAsStream("/com/package/mypackage/resources/myproperties.properties") gave me the InputStream.
I'm just wondering y this is so? Is it mandatory that the "resources" be at the main class level?

Thanks,
Naresh
16 years ago
I've tried using a single "/" too... but still it wasn't working.
But when I moved the resources folder to the directory structure of the class files' package, it started working fine.
Is it required that the resource files be at the package level of the main-class? I didn't know this.
16 years ago
Hi All,
I'm having a strange problem.
I have an application where my class files access a properties file in my "resources" directory.
My directory structure is:
===================================================
MyApp:
--classes
--com
--mypackage
--*.classes
--src
--resources
--myproperties.properties
--myschema.xsd
======================================================
This works fine when I run my program directly.
But when I jar these files "com" and "resources" together, and try to run the executable jar file, I'm getting the FileNotFoundException when my code tries to access the file.
The file is accessed as-
============================================================
File myFile = new File("resources//myproperties.properties")
=============================================================
I've tried accessing the file using-
================================================================================== getClass.getClassLoader.getResourceAsStream("/resources//myproperties.properties")
===================================================================================
But this is giving me "null".

Can somebody help me out, how can I access the file which is archived the executable jar file itself?

Thanks,
Naresh
16 years ago
Hi,
I would like to know if its possible to define a schema in XSD to check a condition where the contents of two elements is the same.
For ex:
If we have
<x>
<y>string_value</y>
<z>
<a>some_value</a>
</z>
</x>

The permitted values for <a> are either the string that is given in <y> or some integer value.

Is there a way we can enforce this constraint in our schema definition?
Can somebody help me out, if it can be done?

Thanks,
Naresh
Hi Srivatsa,
thanks a lot that really helps me.
Thanks again.
-Naresh
Hi all,
i need to develop an XSD for a requirement where an element is recursively defined within itself, but we should specify a constraint that only the upper level element takes a particular value, which can't be taken by the same kind of element when defined as the child of something.
For ex:
=======================================================
<x>
<name>MAIN</name>
<y>
<x>
<name>Some value which should not be MAIN</name>
</x>
</y>
</x>
========================================================
Can somebody help me out as to how i can define such schema using XSD?

Thanks,
Naresh
Hi All,
I have a problem wherein I have two text files containing non English text (say, Hindi for instance). I have to compare the contents of the two files. Can anybody help me as to how I can do this using Java?
Thanks,
Naresh
16 years ago
Thanks Ritchie, that was a real helpful one.
16 years ago
Hi,
can anybody please let me know what this clone() method is? And what is it used for? Going through the API I found that it is used to return a copy of an object, what I'm unable to understand is - "what it is required for?"

Thanks,
Naresh
16 years ago
Hi all,
I have encountered a strange piece of code whic goes like:
=============================================================
final long A = 24*60*60*1000*1000;
final long B = 24*60*60*10000;
System.out.println("A/B = "+A/B);
============================================================
This gives "5" as against the expected value of "1000".
Can anybody let me know how this "5" has come?
Thanks,
Naresh
Hi,
can u paste the stack trace.
I think there's a problem with th eproperty emailID in the bean.
Regards,
Naresh
18 years ago