0

How do I remove the package name from the XML output of the Java to XML Smook parser?

Sample Code:

Smooks smooks = new Smooks();
ExecutionContext executionContext = smooks.createExecutionContext();
StringWriter writer = new StringWriter();
smooks.filterSource(executionContext,
    new JavaSource(inputJavaObject),
    new StreamResult(writer));
System.out.println(writer.toString());
Perception
  • 79,279
  • 19
  • 185
  • 195
user1752078
  • 95
  • 3
  • 8
  • [What have you tried?](http://www.whathaveyoutried.com/) – Andrew Thompson Jan 28 '13 at 10:57
  • @Andrew Thompson We tried to parse the Java Object to XML .Then it parsing done correctly.But i am getting java object with package name.How to resolve this could u please help me.. – user1752078 Jan 28 '13 at 11:54
  • Run the XML through an XSLT that removes the package names, alternately, use JAXB. There are lots of ways to clean the data of package names. – Andrew Thompson Jan 28 '13 at 12:03
  • Are you new to Google? I would throw 'xslt+tutorial' into it & go from there. As it is, I am voting to close as 'not a real question'. – Andrew Thompson Jan 28 '13 at 12:49

0 Answers0