my dog learned polymorphism*
The moose likes Java in General and the fly likes problem in linking java class with xml [need some advise] Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "problem in linking java class with xml [need some advise]" Watch "problem in linking java class with xml [need some advise]" New topic
Author

problem in linking java class with xml [need some advise]

Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 980
    
    2
Hi All,

i had given a task in my office, in which i need to write one utility class to create and load some data in our product, i wrote that one class which create huge amount of complex data, i just need to run that class and it creates and loads all the data.
now scenario is changed, we may need to load this when our product gets installed, but the problem is during product installation data can be loaded from xml loaders, but i created all data using java classes, and now i don't want to waste all my efforts, is there any way for this?

one way which hit my mind is, if i can call that java class in one xml file, and load data using that xml file, but i am not sure if this would be possible or not.

Thanks,
Punit
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 980
    
    2
Hi,

please let me know if more information is needed, i really need to solve this issue.

Thanks,
Punit
Vimal Kumar Venugopal
Ranch Hand

Joined: Aug 20, 2011
Posts: 43

Could you clarify more?

Am only getting bits and pieces of information. What is the complex data that you are generating?


"Value has a Value only if its value is valued!"
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 980
    
    2
well, that is data which we would need to use for performance testing, i can create that data with xml loaders as well, but the thing is it will again take lot of time of mine, and i just want to know, if i can use those java classes instead of xml's.

i wanted to know, if is there any way i can call that java file into xml.
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4167
    
  21

Punit Jain wrote:... if i can call that java class in one xml file, and load data using that xml file,...

XML is a markup language, not a language for executing code, so what you say in this statement makes no sense.

What exactly is your issue? It is not clear at all. Here is what I understand:
1) You have an application which stores data in XML
2) You wrote a class which loads data from XML into Java
3) You have an installer

After that I have no idea what you want or need. You talk about xml loaders, but what are those? What is the step that is missing? What exactly is supposed to happen at install time?


Steve
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 980
    
    2
Steve Luke wrote:
Punit Jain wrote:... if i can call that java class in one xml file, and load data using that xml file,...

XML is a markup language, not a language for executing code, so what you say in this statement makes no sense.

What exactly is your issue? It is not clear at all. Here is what I understand:
1) You have an application which stores data in XML
2) You wrote a class which loads data from XML into Java
3) You have an installer

After that I have no idea what you want or need. You talk about xml loaders, but what are those? What is the step that is missing? What exactly is supposed to happen at install time?


well, sorry for the lack of information, i can't tell exactly what that data is.
but,

we have a product (a PLM software), usually we use loader(below example kind of loaders) to create data and load that data to our product, and if needed we can add that data at our product installation process, for that we have our own framework, which loads that data (Add those loader to our installation process).

And for creating that data using xml's we use our utility classes.
xml calls api's from those utility classes and create that data, for ex:
(suppose i need to create a user in our product, i call appropriate api in the xml, provide appropriate arguments and load that file, and it creates user to our product, something like this):

EX:


But the task which was given to me was to create a huge amount of data, for ex: 2000 user(just for example, but actual data was complex).
so if i created that using xml, they would get millions of lines, so instead of xml, i wrote a java class in which i used some loops, which create that data (for ex: 2000 users).

Now problem i am facing is, we can only load data using those loader (xml's), to our product, our framework allows them only, of course i can't change the framework, but if anything i could do from my side?

hope you got me, else let me know.

Thanks,
Punit











 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in linking java class with xml [need some advise]
 
Similar Threads
pdf gen using xsql
few questions related to ant and jenkins.
Java objects to XML, possibly using JAXB
Creating XML from scratch
Heap Space