Couldn't able to read xml file
Moderators: chulett, rschirm, roy
Couldn't able to read xml file
Hi ,
I am trying to read xml file and load it into text file .
I used External Source->xml input->transformer->sequential file
In External Source , i Have specified
Source Method as Specific Program
Source program as ls /abc/ghe/books.xml
Record Type as implicit
Record delimiter as none
In Xml input stage , i have specified url/filepath in input tab
When i ran the job i got the below error
XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 0, column: 0): An exception occurred! Type:RuntimeException, Message:The primary document entity could not be opened. Id=/abc/ghe/books.xml
The sample xml is as follows
<x:books xmlns:x="urn:books">
<book id="bk001">
<author>Writer</author>
<title>The First Book</title>
<genre>Fiction</genre>
<price>44.95</price>
<pub_date>2000-10-01</pub_date>
<review>An amazing story of nothing.</review>
</book>
<book id="bk002">
<author>Poet</author>
<title>The Poet's First Poem</title>
<genre>Poem</genre>
<price>24.95</price>
<review>Least poetic poems.</review>
</book>
</x:books>
Could anyone please help me out in resolving this issue
I am trying to read xml file and load it into text file .
I used External Source->xml input->transformer->sequential file
In External Source , i Have specified
Source Method as Specific Program
Source program as ls /abc/ghe/books.xml
Record Type as implicit
Record delimiter as none
In Xml input stage , i have specified url/filepath in input tab
When i ran the job i got the below error
XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 0, column: 0): An exception occurred! Type:RuntimeException, Message:The primary document entity could not be opened. Id=/abc/ghe/books.xml
The sample xml is as follows
<x:books xmlns:x="urn:books">
<book id="bk001">
<author>Writer</author>
<title>The First Book</title>
<genre>Fiction</genre>
<price>44.95</price>
<pub_date>2000-10-01</pub_date>
<review>An amazing story of nothing.</review>
</book>
<book id="bk002">
<author>Poet</author>
<title>The Poet's First Poem</title>
<genre>Poem</genre>
<price>24.95</price>
<review>Least poetic poems.</review>
</book>
</x:books>
Could anyone please help me out in resolving this issue
Hi ,
I have included the namespace declaration in xml input stage
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:defns="urn:books"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
I am not sure about the xpath.
Can you let me know where do we need to define the xpath.
I have defined the path for each column in the output tab of the xml input stage
I have included the namespace declaration in xml input stage
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:defns="urn:books"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
I am not sure about the xpath.
Can you let me know where do we need to define the xpath.
I have defined the path for each column in the output tab of the xml input stage
Have you done any searches? There are hundreds of threads with a similar subject....you need to use the xml metadata importer and define your columns ---- when you do, your xpath will be in the description property of your table def.
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>