Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trying to get data stream from one class to another

 
Matt Kohanek
Village Idiot
Ranch Hand
Posts: 484
Java jQuery Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a class to deserialize data into a stream, here is the method (using SimpleXML btw):



Then I have another class that takes an input stream, and uses it to generate a richfaces tree. I doubt the data stream I get from readXML will yield the correct results, but I have no other clue about what to try, so I at least want to give this a chance. Here is a snippet of that code:



This is sample code I got from a site that takes a data stream that comes froma .properties file to generate the tree nodes. I am just trying to substitute the data stream from readXML for the data stream that is currently coming from the .properties file.

So how can I take the data stream from the readXML class and substitute it into the second bit of code in place of the dataStream variable. Like I said, I doubt this will even compile, but I need some kind of starting point.

Or, if someone can help me write some code that takes elements from the follwoing layout and uses them to populate the tree nodes it would be great.



The tree nodes need to popuate from the <name>, <device>, and <channel> elements. In fact I think I will create a second post just for that in hopes I can get help with it.

edit - my first post as the village idiot!!
 
Matt Kohanek
Village Idiot
Ranch Hand
Posts: 484
Java jQuery Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
edited out - better handled in a PM I believe
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic