Atul Pawar

Greenhorn
+ Follow
since Jan 31, 2009
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 Atul Pawar

I am using business object 11 release version 2.(SAP product)
I am not able to edit report(web intelligence).
The message I am getting
" The version of [color=darkred]web intelligence java report panel(10.5.8.1187) is not
signed.The application can not be executed on this machine without
.java.policy file deployed in your home directory"
I tried to set browser setting and also tried java version 1.4/1.5/1.6
but even the problem is not resolved.
Due to that I am not able to work from 2 weeks.
Please help.
Thanks.
13 years ago

William Brogden wrote:With the assistance of XML-SPY I located all the problems in your DTD.



Your formatting was not quite correct and you had left out the #PCDATA bits.

Bill



At last the code compilled.
Iam really happy that i know what is DTD and how to test an xml through that.....
now help me understanding schemas.


William Brogden wrote:With the assistance of XML-SPY I located all the problems in your DTD.



Your formatting was not quite correct and you had left out the #PCDATA bits.

Bill




Thanks a lot bill........

William Brogden wrote:Try just removing the DOCTYPE line from the XML file, it is not required.

Whoever authored the XML document had in mind that it would be used with a DTD - you should ask the author where the DTD is.

Bill



i STUDIED DTD AND MADE THIS DTD FOR MY orders.XML FILE NOW output after putting this directory orders.dtd

<!-- orders.dtd -->
<!ELEMENT orders(order)>
<!ELEMENT order(customerid,status,item)>
<!ELEMENT customerid>
<!ELEMENT status>
<!ELEMENT item (name,price,qty)>
<!ELEMENT price>
<!ELEMENT qty>


output is same

D:\MyProjects>java OrderProcessor orders.xml
Parse error line: 2 column: 3
org.xml.sax.SAXParseException: The markup declarations contained or pointed to by the document type declaration must be well
-formed.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown Source)
at org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubset(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at OrderProcessor.main(OrderProcessor.java:19)
Problem parsing the file





Ulf Dittmer wrote:

Atul Pawar wrote:HI, Anybody got my issue.


Yes, we get it. But it seems that you're missing what William is trying to tell you: that the problem seems to be in the DTD, and since we don't have that, there's nothing we can do to help. We might be able to help if you posted the DTD. Of course, once you look at it, you may spot the problem yourself :-)




yes thanks,
but actually i have only the xml file and java code but no dtd
i am really sorry but i dont have any knowledge on DOM or dtd. is it one more file how should i design it.

Sorry oncemore.

HI, Anybody got my issue.


William Brogden wrote:My crystal ball is in the shop for the 10,000 vision checkup so I am unable to see the DTD document referred to in:

"The markup declarations contained or pointed to by the document type declaration must be well -formed."

and


I did get a vision of you checking the line and column information in the SAXParseException and finding that it also points to the DOCTYPE line as the cause of your problem.

Read this wikipedia entry for more about DTD formatting.

Bill
PS. The free trial version of XML SPY (download here) should be able to locate the problem in your DTD / XML. I bought a commercial copy years ago and never regretted it.

Paul Clapham wrote:Well, this is just basic Java knowledge. It's because the expressionreturns true.




Ya I know that ,
but what about Style sheet which version does it support...
what should be the value of stylesheet which will return true.
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
//import java.io.File;
import org.w3c.dom.DOMImplementation;
//import org.w3c.dom.Document;

public class ShowDomImpl
{
public static void main (String args[])
{
try
{
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
//dbf.setValidating(true);
DocumentBuilder docb = dbf.newDocumentBuilder();
DOMImplementation domImpl = docb.getDOMImplementation();
//doc = db.parse(docFile);

if(domImpl.hasFeature("StyleSheets","2.0"))
{
System.out.println("Style Sheets are supported");

}
else
{
System.out.println("Style Sheets are not supported");
}
}
catch(Exception e)
{
System.out.println("Problem parsing the file " + e.getMessage());


}

}
}



whats the reason please clarify in brief

William Brogden wrote:Now that you are catching SAXParseException you can find out exactly which part of the document is the problem.

Reading the JavaDocs we find the methods getLineNumber and getColumnNumber

catch( SAXParseException e ){
System.out.println("Parse error line: " + e.getLineNumber() + " column: " + e.getColumnNumber() );
e.printStackTrace();
System.exit(1);
}

However, you already have a hint as to the problem being in your DTD:
"The markup declarations contained or pointed to by the document type declaration must be well -formed."
You should probably look at that DTD first.

You should also spend some time browsing the JavaDocs.

Bill






Any body there
We all know that if we use this line we will get an exception

System.out.println(5/0);

but if we use this line
System.out.println(5.0/0.0);

This will not cause an error. it will show Infinite.

Why?
13 years ago

k arun kumar wrote:hi Carlos Lacerda,

thanks for your reply.
i inquired that too
but they said that voucher can only be used inside India only.
so am in big trouble now
so please if anyone from india need exam vouchers means help me by getting mine.
i will sent the voucher through courier.
please someone help mean.

regards
arun kumar




Hi is it possible that you can transfer to other persons name,
Can i use it,
I want SCJP 6 voucher .

thanks.
13 years ago

Sachin Adat wrote:

Ankit Garg wrote:

Adeel Ansari wrote:Abey paka matt ~= Don't put rubbish, Don't play jerk, etc.


Ohh yes! I actually misinterpreted it...


You really did............
Its OK, he wasn't being harsh, its just that we are that close friends..........
At least I got him to come to the ranch.........

By the way, where is Akash, who started all this...........



Sachin its really good to see people are really worried on what things are been posted.
lots of helping hands like Ankit Garg.

by the way Akash must have got all things he wanted and he really should be thankful for my quote.
Thanks to Adeel ansari for his descriptive comment....but Hi Adeel, Dont worry sachin is my best friend so dont worry for his emotions..

any ways thanks and i beleive will be great ranching...... for all and for me too....



William Brogden wrote:

i have already used that exception in my catch loop



If I am going to go to the trouble to make a helpful suggestion, the least you can do is read the suggestion carefully. Jumping to conclusions is one of the leading causes of programmer stumbles.

Bill



Yes GreenHorns are meant to scratch their heads...
Thanks for that........


D:\MyProjects>java OrderProcessor
org.xml.sax.SAXParseException: The markup declarations contained or pointed to by the document type declaration must be well
-formed.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown Source)
at org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubset(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at OrderProcessor.main(OrderProcessor.java:21)
Problem parsing the file



this was the output.

I also downloaded xerces.jar after this output but
and place it in jre/lib/ext also jdom and dom1.6.jar in same directory is it right to do so......

starting with dom learning is getting more lengthy.....

Thanks,

Regards,
Atul Pawar.

Carey Evans wrote:The SAXException instance should have more information about what caused the error. Try:




i have already used that exception in my catch loop and same exception is giving my declared output.
Problem parsing file
can any one give me exact solution.

Ankit Garg wrote:

Atul Pawar wrote:Abey pakka matt Sachin Adat.
bol usko niit ka offer has expired.now wait for next offer or call niit office.....



Lemme translate it

Sachin it is not guaranteed.
NIITs offer for discounted vouchers has expired. now wait for next offer or call niit office.....

Now also try asking any IIHT center as I gave my SCJP exam at IIHT center and they told me that they also provide discounted vouchers...



Thanks Ankit,