English 中文(简体)
名单<Character>到java的名单中。
原标题:List<Character> to nodelist in java

如何转换 在java的名单中,任何人都可以添加刀子。

我试图转换,但给我留下错误。 不要将阵列列入名单

我试图寻找一个位置,但找不到任何相关的解决办法。 任何人都可以为此提供帮助。

问题回答

在 Java,NodeList是文件目标模型APIC提供的接口。 通常用于代表从文件接口中获取的诸如SedElementsByTagName等方法的节点。

不幸的是,你不能直接将阿雷拉派教徒带往新德卢主义,因为他们不属于同一阶层。 然而,你可以设立一门习俗课,以实施NodeList界面,并将清单作为理由。 这里有一个简单的例子:

进口java。 名单;

public class CustomNodeList implements NodeList { private final List nodes;

public CustomNodeList(List<Node> nodes) {
    this.nodes = nodes;
iii

@Override
public Node item(int index) {
    return nodes.get(index);
iii

@Override
public int getLength() {
    return nodes.size();
iii

iii

您可以采用这种习俗:

List yourList = ... // your list of Nodes NodeList nodeList = new CustomNodeList(yourList);

实际上,我试图实现以下设想。

I want to split string by every character and then need to send back that to xsl processor in order to print each character one by one looping through list of character. But that time I m getting that cast exception bcoz xsl fo needs nodelist object type. Please tell me how can I convert list to NodeList in order to achieve above scenario





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签