單項選擇題

在J2EE中,用JAXP轉(zhuǎn)化XML文檔,可以創(chuàng)建輸出流把數(shù)據(jù)輸出到屏幕上,以下創(chuàng)建該輸出流的代碼是()。 

A.Stream result = stream.newStream(System.out);
B.StreamResult result = new StreamResult(System.out);
C.Stream result = new Stream(System.out);
D.StreamResult result = DOMSource.newStreamResult(System.out);

題目列表

你可能感興趣的試題

多項選擇題

在J2EE中,使用()選項中的代碼,可以生成如下XML文檔: 
<PEOPLE>  <PERSON> 
<NAME>Tony Blair</NAME>   
</PERSON> <PEOPLE> 

A.Element people = doc.createElement("PEOPLE");  Element person = doc.createElement("PERSON"); Element name = doc.createElement("NAME"); name.appendChild(doc.createTextNode("Tony Blair")); people.appendChild(person); person.appendChild(name); doc.appendChild(people);
B.Element people = doc.createElement("PEOPLE");  Element person = doc.createElement("PERSON"); people.appendChild(person); Element name = doc.createElement("NAME"); name.appendChild(doc.createTextNode("Tony Blair")); person.appendChild(name); doc.appendChild(people);
C.Element people = doc.createElement("PEOPLE");  Element person = doc.createElement("PERSON"); people.appendChild(person); Element name = doc.createElement("NAME"); name.appendText(doc.createTextNode("Tony Blair")); person.appendChild(name); doc.appendChild(people);
D.Element people = doc.createElement("PEOPLE");  Element person = doc.createElement("PERSON");Element name = doc.createElement("NAME"); name.createTextNode("Tony Blair"); people.appendChild(person); person.appendChild(name); doc.appendChild(people);

微信掃碼免費搜題