Dear Forum.
I heave a little problem.
When I insert a nonXML-document with the Java-API, fx a normal text-file, then the newlines disappears (gets stripped).
If I insert the following text into a nonXML-document in tamino:
“Hello\r\nWorld”
Then when I retrieve it, I get this text
“HelloWorld”
Note that whitespace are NOT strippeed, only newline characters gets stripped.
I have included the schemae for the nonXML-document below.
Best Regards
Stefan Krabbe
–cut–
<?xml version = "1.0" encoding = "UTF-8"?>
<xs:schema xmlns:xs = “XML Schema” xmlns:tsd = “http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition”>
xs:annotation
xs:appinfo
<tsd:schemaInfo name = “html”>
<tsd:collection name = “reports”></tsd:collection>
<tsd:doctype name = “html”>
tsd:nonXML</tsd:nonXML>
</tsd:doctype>
tsd:adminInfo
tsd:versionTSD3</tsd:version>
tsd:created2002-12-16T18:36:03.290+01:00</tsd:created>
tsd:modified2002-12-16T18:36:03.290+01:00</tsd:modified>
</tsd:adminInfo>
</tsd:schemaInfo>
</xs:appinfo>
</xs:annotation>
<xs:element name = “html_doc”></xs:element>
</xs:schema>
Hi Stefan,
Please try build your TNonXMLObject using the InputStream. Hope you get the desired output.
Try the following :-
public static String NON_XML =“Greeting by=‘XMLGreetingApplication’:Hello\r\nWorld”;
TNonXMLObject nonXMLObject = TNonXMLObject.newInstance
(new ByteArrayInputStream(NON_XML.getBytes()),null,“ino:nonXML”,“NonXMLGreeting”,text/plain" );
I hope this solves your concern, if not get back,
thanks,
Sonal.
Hi Sonal.
I replaced the StringReader (used in the documentation/examples) with the ByteArrayInputStream.
Thanx for the help - it worked.
Best Regards
Stefan Krabbe