XML setContent trouble

edited October 2013 in Programming Questions

I am trying to setContent(). of an XML Element to an HTML file.

when I try the tag simply contains the name of the file not the information in the file.

child.setContent("file.htm") ;

results in: <child>file.htm</child>

I want it to contain the info in the file. Any help?

Answers

  • Answer ✓

    You have to load the file out offile.htmfirst, then place that content into the child element. There is no built-in way to detect if aStringhappens to be an XML file to then add it automatically; this must be done manually.

    Side note: First post on the new forum!

  • Yeah , thanks a lot, sorry for the delay in gratitude.

Sign In or Register to comment.