473,396 Members | 1,786 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

hi i want one help from u urgently

i want answers for the questions i have posted please help me in this i want this questions formy interview
1) class>
<attributes>
<attr type='static' name='max num' default=0>
<attr type='inst' name='num = 0'\>
</attributes>
<methods>
<meth type='macro' code='x < y & y > z'\>
<meth name='getMax'>
<!CDATA[[
if (num > max num) then max num = num
]]>
</meth>
</methods>
</class>

Referring to the XML data above, how many well-formedness errors does a JAXP processor find?

a) Zero
b) Two
c) Three
d) Five
e) Six


2) What type of data can a SAX parser process?

a) RTF
b) HTML
c) XML
d) Arbitrary plain text
e) SGML

3) <message>
Good
<highlight>
day
</highlight>
earthling.
</message>
org.w3c.dom.Node message = rootnode.getFirstChild();
org.w3c.dom.Node earthling = message.getLastChild();
while (earthling != null)
{
System.out.println(earthling.getNodeValue());
earthling = earthling.getPreviousSibling();
}
Referring to the XML data and DOM code above, where rootnode is a org.w3c.dom.Document object, how many times is the print statement in the while loop executed?

Q4). public class SaxHandler extends org.xml.sax.helpers.DefaultHandler
{
private org.xml.sax.Locator locator;
public void setDocumentLocator(org.xml.sax.Locator locator)
{
this.locator = locator;
}
public void error(org.xml.sax.SAXParseException exception)
{
// Print the source of the error
}
}

Referring to the sample code above, if using a SAX parser, what code do you use in the error method to display the filename, line number, and column number of an error? (sanjay)

a) System.out.println(locator.getPublicId() + ": " +
locator.getLineNumber() + ", " + locator.getColumnNumber());
b) System.out.println(exception.getCause() + ": " +
locator.getLineNumber() + ", " + locator.getColumnNumber());
c) System.out.println(exception.getSystemId() + ": " +
exception.getLineNumber() + ", " + exception.getColumnNumber());
d) org.xml.sax.Locator source = new LocatorImpl();
System.out.println(source.getSystemId() + ": " +
source.getLineNumber() + ", " + source.getColumnNumber());
e) It is not possible to find the name of the file with either the locator or exception variables.
Jan 20 '08 #1
0 754

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Kamliesh Nadar | last post by:
Hi I am developing a software using VB.NET I am facing following problems - 1. Though I have placed the NotifyIcon control on the window service application, after starting the service I am...
1
by: net4matrimonials | last post by:
I m using session veriables of asp.net on two websites www.net4professionals.com(job site) and www.net4matrimonials.com (bride/groom service) when i create a session on page A i use codeing...
0
by: Asim Khan | last post by:
Dear all, A well reputable group of companies in Pakistan we urgently required a System Support Engineer for our sister concern factory located in Karachi at Korangi Industrial Area, Preference...
1
by: anil | last post by:
hello all i am anil kumar, pursuing master's degree in Computer applications . now i have got some opensource project. that is related to USB sniffing. tha t is snoopypro. Actalluy this is...
11
by: Rajendran | last post by:
I just want to clear the above three lines from the current position, so that I can start printing my results from that point. In short I want to clear a portion of my screen. Note: I work in...
4
by: PINKA | last post by:
can any one explain plz urgently code was this #include<stdio.h> #include<conio.h> void main() { double a=3.1428571; int b=4347;
4
by: Joonshik Kim | last post by:
I was trying to define 3d array with pointer to pointer. I wrote like following. int ***d; nx = 3; ny = 5; nz = 4; d = (int ***)malloc((int) nx*sizeof(int **)); *d = (int **)malloc((int)...
0
by: bylabylamo | last post by:
hi , can anyone of u please give me an idea of how to convert xml to json using java.it is very urgently required.
1
by: janakivenk | last post by:
Hello, I am running Oracle 10g R2 in our office. I created the following procedure. It is suppose to access an xml file ( family.xml). The procedure is compiled and when I try to run it, i get the...
1
by: dillipb | last post by:
Please Reply Urgently In the given string '<object width=\"425\" height=\"350\"><param name=\"movie\" value=\"http://www.youtube.com/v/${5}\"></param><param name=\"wmode\"...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.