1

I have parsed (not sure if that is the correct terminology) a set of data into an xml string so that its something like this:

    <Data>
    <Books DataType = 'String' Values = 'Hello World', 'Hi'..../>
    ....
    </Data>

However, I now want to 'INSERT' that set of data into an oracle database using SQL. Everything I looked up uses DOM or some kind of document builder that I dont want/need in my program. The closest thing I have found is CLOB.

Is there any special methods that I can use in JAVA that would help me?

1 Answers1

0

Why don't you store them into Strings ? How to store unlimited characters in Oracle 11g?

Or you can try mix JPA and JAX-B with somthing like this :

import javax.persistence.Entity;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
@Entity
public class Book {
...
}

and

import javax.persistence.Entity;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
@Entity
public class Data {    
    private List<Book> books;
...
}
Community
  • 1
  • 1
Karbos 538
  • 2,977
  • 1
  • 23
  • 34