Entries Tagged as 'Programming'
Basics of validating xmls with a given schema in C++.
1. Create parser instance.
SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
2. Set required features to parser instance as follow.
// Enable the parser’s schema support parser->setFeature(XMLUni::fgXercesSchema, true);
// Schema validation requires namespace processing to be turned on.<br />parser->setFeature(XMLUni::fgSAX2CoreValidation,true);<br />parser->setFeature(XMLUni::fgSAX2CoreNameSpaces,true);
3. Set schema location using setPropery api call with/without namespace. If we want use […]
Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new web pages.
[Read more →]
Tags:parser·sax2·schema·validation·xerces-c·xml
Mysteriously got the following exception when trying to build an Eclipse project:
“resource is out of sync with the file system”
Although I can’t be sure, I think I may have deleted a file outside of Eclipse. To fix the problem, right click the project or edited resource […]
Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new web pages.
[Read more →]
Tags:eclipse·Java·out of sync file system.
Basics of validating xmls with a given schema.
1. Create parser instance.
SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
2. Set required features to parser instance as follow.
// Enable the parser’s schema support
parser->setFeature(XMLUni::fgXercesSchema, true);
// Schema validation requires namespace processing to be turned on.
parser->setFeature(XMLUni::fgSAX2CoreValidation,true);
parser->setFeature(XMLUni::fgSAX2CoreNameSpaces,true);
3. Set schema location using setPropery api call with/without namespace. If we want use ‘ExternalSchemaLocation’ property we need to […]
Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new web pages.
[Read more →]
Tags:parser·sax2·schema·validation·xerces-c·xml
One of the very common task in oracle environment is export/import of CSV files to Oracle database. Export is pretty straight forward as many of oracle clients provide this as standard functionality for any query. But for import, we can do by writing our own scripts using pl/sql or java or .NET or any other […]
Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new web pages.
[Read more →]
Tags:
If you get this error while trying to create a foreign key, it can
be pretty frustrating. The error about not being able to create a .frm
file seems like it would be some kind of OS file permission error or
something but this is not the case. This error has been reported as a
bug on the MySQL […]
Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new web pages.
[Read more →]
Tags:
Similar exceptions are :
1. java.io.IOException: Io exception: Unexpected packet
2. java.sql.SQLException: Protocol violation
3. java.sql.SQLException: Io exception: Bad packet type
4. java.sql.SQLException: Bigger type length than Maximum
5. java.sql.SQLException: Io exception: Invalid Packet Lenght
6. java.sql.SQLException: Closed Connection
7. java.sql.SQLException: Closed Statement
8. java.sql.SQLException: Refcursor value is invalid
9. java.sql.SQLException: Io exception: Size Data Unit (SDU) mismatch
10. java.sql.SQLException: Must be logged on to […]
Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new web pages.
[Read more →]
Tags:
An interesting exception faced while parsing xml content. Also, on further analysis on this error caused below similar issues started to raise.
Another similar exception is:
java.io.UTFDataFormatException: Invalid byte 1 of 1-byte UTF-8 sequence
Here, I am trying to parse an xml string using byte array from the xml string, and give that array as input to xml […]
Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new web pages.
[Read more →]
Tags:
In my PL/SQL procedure I had to add a text including newline (\n in
java, ascii #10) in a text to be read by a java application. Tried with
the code
l_text := ‘hello\nworld’;
This did not work, the \n character behaves clearly different in PL/SQL than
in Java and only wrote ‘\n’, probably the same as writing a String […]
Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new web pages.
[Read more →]
Tags:
Seems like this is very common error in pl/sql programming. I know there are many last minute frustrations just because of this error which is no where related to any logic. This seems to be some format error in the programming language itself.
The error message is:
java.sql.SQLException: Non supported SQL92 token at position: 1
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at […]
Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new web pages.
[Read more →]
Tags:sql error·SQL92 token.
Best of way of writing empty links in javascript is
<a href=”javascript:void(0);” onMouseOver=”status=”;return true” onClick=”myPopup();” >
here, due to onMouseOver attribute, it won’t display the link location in the browser status bar. Otherwise, you see the ugly location to “javascript:void(0)” in status bar.
Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new […]
Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new web pages.
[Read more →]
Tags:empty links·javascript