|
TorstenH. wrote: However - this is not functional.
Strang,e it works fine for me; perhaps there is something else that you have not explained.
I must get a clever new signature for 2011.
|
|
|
|
|
|
|
The message is reasonably clear; the HTTP server encountered an error which is recorded in the server logs.
I must get a clever new signature for 2011.
|
|
|
|
|
Hi All
I use adb command for install .apk file in java,it's run successfully and install in android phone.Now i want to start application automatically when application is install successfully.Please help me
|
|
|
|
|
I have a reporting application pulls in data via a JDBC connection and fills my report. It can use any standard JDBC driver that supports Prepared Statements. I now have the need to query XML files directly. Does anyone have any suggestions on a JDBC driver that will read an XML File? What I am looking for is an XML equivalent to CSVJDBC.
So far I have found two options that don't fit my situation very well.
StelsXML - Looks promising but this project currently has no budget.
Ashpool - Open source license. Looks abandon and still has major issues.
|
|
|
|
|
Zig158 wrote: I now have the need to query XML files directly.
There are of course ways to extract information from XML data which have nothing to do with JDBC.
|
|
|
|
|
Yes I could extract the XML data to a database and then query it from there. I am trying to avoid this because it will require changes to the process that I do not control. The goal is the load the XML file like a table the same way CSVJDBC lets you load a CSV file like a table.
|
|
|
|
|
Zig158 wrote: Yes I could extract the XML data to a database and then query it from there.
Could.
That however has nothing do to with what I said however.
Zig158 wrote: The goal is the load the XML file like a table the same way CSVJDBC lets you load a CSV file like a table.
I am going to presume at this point that you know nothing about the available APIs suited to accessing XML. Following is some background.
http://en.wikipedia.org/wiki/Document_Object_Model[^]
You should then google for resources on using XML in java.
|
|
|
|
|
Did you read his question?
He has an existing reporting tool that uses JDBC. He would like to use that reporting tool to access data in XML format.
His question is: is there any JDBC driver that will allow him to use the reporting tool directly on the XML data? Failing that, he could extract the XML into a database and then run the reporting tool over that, but he would rather not.
He is not asking about how to manipulate XML data. He is asking how to read XML through JDBC because that is the constraint he has in place with his reporting tool.
|
|
|
|
|
David Skelly wrote: He has an existing reporting tool that uses JDBC. He would like to use that reporting tool to access data in XML format.
I missed that.
|
|
|
|
|
Zig158 wrote: Does anyone have any suggestions on a JDBC driver that will read an XML File?
Now that it was pointed out that that I misread your question...
What is the complexity level of the report -> xml interface?
If it isn't too significant then one option would be to write your own JDBC driver. Put only the functionality you need into it. Something like a select with some simple where clauses isn't that difficult to convert into a xpath with the result set spanning the result of that.
|
|
|
|
|
I was hopeful that I could avoid writing something custom/new, but it sounds like that is the case. I could rewrite the reader interface for CSVJDBC.
|
|
|
|
|
Zig158 wrote: I could rewrite the reader interface for CSVJDBC.
Not a bad idea actually. That gives some trivial functionality for SQL that you then would not need to create yourself.
|
|
|
|
|
As another thought...
You mentioned loading to a database would be a problem. Why specifically?
As one possibility on that route, use the embedded version of Derby. That wouldn't require external resources and it already has the JDBC driver. So the only problem is the load itself.
|
|
|
|
|
i have this in my code:
properties props = new properties();
props.put("mail.transport.protocol", "smtps");
How do i replace those "properties.put" without having to use the properties ?
|
|
|
|
|
cool - it took just 2 weeks to figure out properties - fantastic!
You can write your own properties-file. It is a basic ASCII text file.
Or you save your data on an object. This requires programming.
regards
Torsten
I never finish anyth...
|
|
|
|
|
yes i managed to figure out. i am teaching myself programming. Yes i manage to learn how to write a properties file alrdy..
|
|
|
|
|
pancakeleh wrote: How do i replace those "properties.put" without having to use the properties ?
What does this sentence mean? Are you saying that you want to write into your properties file without using the properties class?
I must get a clever new signature for 2011.
|
|
|
|
|
oh the "prooperties.put" refers to writing to the properties file without having to key it in the properites file?
modified on Monday, January 31, 2011 8:27 PM
|
|
|
|
|
pancakeleh wrote: oh the "prooperties.put" refers to writing to the properties file without having to key it in the properites file?
The key is "mail.transport.protocol" and the value is "smtp".
|
|
|
|
|
pancakeleh wrote: writing to the properties file without having to key it in the properites file?
Still does not make sense. Try a full explanation of exactly what it is you are trying to achieve.
I must get a clever new signature for 2011.
|
|
|
|
|
for this line of code:
this line sets the properties for sending mail.
like u can put smtp.gmail.com (set host)for sending mail from gmail account.. and second argument is for port
for gmail 587/465
default port is 25/26.
got it ?
you can ask me for more information
|
|
|
|
|
Hi,
i have developed a Java program to convert an infix expression into a postfix expression but in output i am getting null. Below is my program . There is some conceptual mistake but i am unable to find it out. please help me...
import java.util.Stack;
public class infixToPostfix{
private int index;
private char ch;
private char lparenthesis='(';
private char rparenthesis=')';
Stack stack=new Stack();
private String output="";
public boolean isOperator(char op){
if(op == '^' || op == '*' ||op == '/' || op == '%' || op == '+' || op == '-')return true;
else return false;
}
public boolean isOperand(char opr){
if(opr >= 'A' && opr <='Z')return true;
else if(opr >= 'a' && opr <= 'z')return true;
else return false;
}
public int getPrecedence(char c){
switch(c){
case '(': case ')': return 5;
case '^':return 4;
case '*': case '/': case '%': return 3;
case '+': case '-': return 2;
}return 0;
}
public String getPostfix(String expr){
stack.push('(');
for(index=0;index<expr.length();index++){
ch=expr.charAt(index);
if(isOperand(ch)){
output=output+ch;
}
else if(ch == lparenthesis){
stack.push(lparenthesis);
}
else if(isOperator(ch)){
Object pop=stack.pop();
char ch1=pop.toString().charAt(0);
while(getPrecedence(ch1) >= getPrecedence(ch) ){
if(!stack.empty())stack.pop();
else break;
if(isOperator(ch1)){
output=output+ch1;
}
}stack.push(ch);
}
else if(ch == rparenthesis){
while(stack.pop().toString().charAt(0) != lparenthesis){
if(isOperator(stack.pop().toString().charAt(0)))
output=output+stack.pop();
}
}
else {
System.out.print("error.");
}
}
stack.clear();
return output;
}
}
modified on Saturday, January 29, 2011 1:19 AM
|
|
|
|
|
Firstly could you please edit the above and place the code between <pre></pre> tags (not code) so it is correctly formatted. Secondly try and narrow down the problem to the method or block of code relevant to the error; don't just expect people to analyse all your code without having the background knowledge of what it is trying to do.
I must get a clever new signature for 2011.
|
|
|
|