on 2005 May 17 12:20 PM
Hello all,
I'm trying to programaticaly read the contents of an XML Form. I get my resource, grab it's content, get an input stream and start reading. The problem is that instead of a simple XML file being read, what comes back is an entire HTML page with all the layout for the list viewer form, not the XML source.
The code that I'm using is below, I know that it's bad but this is just a test program so it doesn't matter.
StringBuffer sb = new StringBuffer();
IResource res = ....;// Here I get my resource
try{
IContent con = res.getContent();
try{
InputStream is = con.getInputStream();
int c;
while((c = is.read())!=-1){
sb.append((char)c);
}
scrollingText = addToText(scrollingText, sb.toString()+"<br>");
}catch(ContentException e){
}catch(IOException e){
}
}catch(ResourceException rE){
}
So is it possible to access the XML source so that I can read values of specific elements? How?
Regards,
Patrick.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
10 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.