Since the file is continuously changed it wouldn't be possible to have a root element unless it is added as it is rolled.
On 2/28/07, Madduri, Murthy <[EMAIL PROTECTED]> wrote:
Hi, As a part of our J2EE application, we need to build a custom Layout for the logging event. The generated log file is expected to be very large. The custom layout need not to conform to any DTD, but, needs to be a well-formed XML with the root element. I am using XPath expression on the XML string to get the proper output. Right now, I have extended the Layout class to generate the output using brute StringBuffer append method. When I am trying to transform this file (which is not a well-formed XML), the transformer complains that it is missing the root element. Is it a better idea to tweak the XMLLayout to fit-in the custom content? Here is a sample of the content that is in the log file: <MSG><HOST>myHost</Host><STATUS>Response</STATUS></MSG> <MSG><HOST>myHost1</Host><STATUS>FAIL</STATUS></MSG> <MSG><HOST>myHost2</Host><STATUS>Unknown</STATUS></MSG> If I can get this with a root element, the transformer works fine. <ROOT> <MSG><HOST>myHost</Host><STATUS>Response</STATUS></MSG> <MSG><HOST>myHost1</Host><STATUS>FAIL</STATUS></MSG> <MSG><HOST>myHost2</Host><STATUS>Unknown</STATUS></MSG> </ROOT> I appreciate any help on this. Thanks & Regards, Murthy Madduri *(770)263-1231 *Email:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
-- James Stauffer http://www.geocities.com/stauffer_james/ Are you good? Take the test at http://www.livingwaters.com/good/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]