Re: How to define a whole XML document as parameter when calling
a method?
On 10/8/2010 4:11 AM, Gianni Galore wrote:
Assume I want to pass a whole XML document from one class to another similar to:
public void parentmethod() {
XMLdoc myxml = ......
XMLdoc xmlresult = calledsubmethod(myxml);
....
}
XMLdoc calledsubmethod(XMLdoc xmlinstance) {
...<modify xmlinstance>...
return xmlinstance;
}
Unfortunately the code above does not work.
"Does not work" isn't especially informative. What do you mean
by "does not work?" That the code doesn't compile, that it throws
exceptions at run-time, that it runs but doesn't behave as desired,
or ... well, or what?
Also, it would be easier to figure out what's wrong if you would
provide actual code. To do any work with what you've supplied, I
would have to fill in all those .....'s, add all the missing bits,
and so on, and the probability that I'd wind up with code that
"does not work" in exactly the same way as your code is small. It
follows that any advice I gave you based on my reconstruction would
be likely to have little to do with your actual problem, and thus
would be of no help to you. Provide trimmed-down code, by all means,
but let it be actual code and not some kind of meaningless mish-mash.
--
Eric Sosman
esosman@ieee-dot-org.invalid