Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
VRM_5389
Contributor
Contributor

Load the Entire XML Data to xml Type Field

Hi,

I have a Scenario to load the entire XML Content to the XML Field in DB.

Sample.xml

<?xml version="1.0" encoding="ISO-8859-15"?>

<ABC xmlns="http://abc.com/plms/schema/V1.1" creationDate="2019-02-27T13:44:18.622+11:00">

<DEF>data</DEF>

<GHI>data</GHI>

</ABC>

Approach :

tFileInputXML ==> tJavaRow(Store the entire XML data to Context Variable) ==> tdbrow(insert the value by casting to xml (insert into table(data) values(context.xml :: xml);)

Output:

XML Data is loaded to the XML Field in DB.

However only the below content is loaded

<ABC xmlns="http://abc.com/plms/schema/V1.1" creationDate="2019-02-27T13:44:18.622+11:00">

<DEF>data</DEF>

<GHI>data</GHI>

</ABC>

Missing :

<?xml version="1.0" encoding="ISO-8859-15"?>

Though the Log displays the above missing content. It is not being loaded to the field in DB.

When tried the manual Insert as below

insert into table(data) values('

<?xml version="1.0" encoding="ISO-8859-15"?>

<ABC xmlns="http://abc.com/plms/schema/V1.1" creationDate="2019-02-27T13:44:18.622+11:00">

<DEF>data</DEF>

<GHI>data</GHI>

</ABC>

')

Still the Version line is missing.

Appreciate your assistance here. Also please suggest if any appropriate/better design can be applied for the above scenario

Thank you

Labels (3)
0 Replies