XML Information

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
raju4u
Participant
Posts: 56
Joined: Thu Dec 13, 2007 12:30 am

XML Information

Post by raju4u »

Hi All

I am trying to read the xml file

seq-> XMlinput -> dataset

seqfile
format i have mentioned record type implicit
delimeter none.

i am getting the error .can any body help what its regarding .

XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 15, column: 4): Invalid character (Unicode: 0x0)

thanks
N R REDDY
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

First correct your job design, particularly how you read from the source.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You need to validate it, get your hands on a tool (many are free) that will do that validation of how "well formed" it is. Do you have an xsd for it?
-craig

"You can never have too many knives" -- Logan Nine Fingers
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

The first simple test is to make sure you can just open it in IE.

Also, it might be a code set issue also [you will need to do some research on the settings that are available in the header of an xml document as to things like UTF-8 or UTF-16, etc.].

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
raju4u
Participant
Posts: 56
Joined: Thu Dec 13, 2007 12:30 am

XML Information

Post by raju4u »

eostic wrote:The first simple test is to make sure you can just open it in IE.

Also, it might be a code set issue also [you will need to do some research on the settings that are available in the header of an xml document as to things like UTF-8 or UTF-16, etc.].

Ernie


Hi ,

after running the job i am getting follwing warnings:

ML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 1, column: 513): Invalid character (Unicode: 0x0)

and for the rest of the records I got these following errors

XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 1, column: 3): There are more end tags than start tags


XML_Input_readTag: XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 1, column: 1): Invalid document structure

Can you please help me what might be the problem.is that the import problem or xml problem .

please suggest me.

thanks
N R REDDY
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As noted, at the very least your XML document seems to be invalid. Get a corrected one from the source and try again. Did you open it in IE?
-craig

"You can never have too many knives" -- Logan Nine Fingers
raju4u
Participant
Posts: 56
Joined: Thu Dec 13, 2007 12:30 am

XML Information

Post by raju4u »

chulett wrote:As noted, at the very least your XML document seems to be invalid. Get a corrected one from the source and try again. Did you open it in IE? ...
Hi
I opend with IE it is opend correctly.

thanks
N R REDDY
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

OK... teeth pulling time... let's start over. :?

What does your job design look like now? Did you get rid of the Sequential File stage as noted in the blog entry I linked you to? If not, do so now and then try it again. If it continues to fail, post all of these same details again, down to the settings / options used in the XMLInput stage.
-craig

"You can never have too many knives" -- Logan Nine Fingers
raju4u
Participant
Posts: 56
Joined: Thu Dec 13, 2007 12:30 am

XML Information

Post by raju4u »

chulett wrote:OK... teeth pulling time... let's start over. :?

What does your job design look like now? Did you get rid of the Sequential File stage as noted in the blog entry I linked you to? If not, do so now and then try it again. If it continues to fail, post all of these same details again, down to the settings / options used in the XMLInput stage.

please find the xml and xpath.please let me know is there any mistake in the xml or in my xpath or any suggestion

/ns1:ACORD/ns1:InsuranceSvcRs/ns1:AgencyHubInfo/ns1:NationwideInfos/ns1:NationwideInfo/ns1:Addr/ns1:Addr1/text()
/ns1:ACORD/ns1:InsuranceSvcRs/ns1:AgencyHubInfo/ns1:NationwideInfos/ns1:NationwideInfo/ns1:Addr/ns1:City/text()
/ns1:ACORD/ns1:InsuranceSvcRs/ns1:AgencyHubInfo/ns1:NationwideInfos/ns1:NationwideInfo/ns1:Addr/ns1:StateProv/text()
/ns1:ACORD/ns1:InsuranceSvcRs/ns1:AgencyHubInfo/ns1:NationwideInfos/ns1:NationwideInfo/ns1:Addr/ns1:PostalCode/text()
/ns1:ACORD/ns1:InsuranceSvcRs/ns1:AgencyHubInfo/ns1:NationwideInfos/ns1:NationwideInfo/ns1:Addr/ns1:CountryCd/text()


XML


<ACORD xmlns="http://www.ACORD.org/standards/PC_Suret ... 1.8.0/xml/">
<InsuranceSvcRs>
<AgencyHubInfo>
<NationwideInfos>
<NationwideInfo>
<Addr>
<Addr1> 99 TROY ROAD </Addr1>
<City> EAST GREENBUSH </City>
<StateProv> NY </StateProv>
<PostalCode> 12061 </PostalCode>
<CountryCd> US </CountryCd>
</Addr>
</NationwideInfo>
</NationwideInfos>
</AgencyHubInfo>
</InsuranceSvcRs>
</ACORD>

when i try to read this xml info i am getting the follwing warnings

XML_Input_6,0: Warning: sample.XML_Input_6: XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 11, column: 20): Invalid character (Unicode: 0x0)

XML_Input_6,0: Warning: sample.XML_Input_6: XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 2, column: 31): Expected comment or processing instruction

and i have given namespaces through load also

please suggest me how can i proceed further.


in xml tags i have mentioned spaces is that ok or wrong,because i am able to read the data for diferent data.


thanks
N R REDDY
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

just guessing at this point, but the next suggestion is to start doing some unicode research for info that might need to be in the header....right now it appears that there is no header, but one might be needed based on the characters that may exist deep in your document. It looks like an ACORD insurance document....What country is it from?

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Please, for goodness sakes, answer my dang questions regarding your job design. If your design is wrong, we could be chasing wild geese that a simple redesign would solve. :evil:
-craig

"You can never have too many knives" -- Logan Nine Fingers
raju4u
Participant
Posts: 56
Joined: Thu Dec 13, 2007 12:30 am

XML Information

Post by raju4u »

chulett wrote:Please, for goodness sakes, answer my dang questions regarding your job design. If your design is wrong, we could be chasing wild geese that a simple redesign would solve. :evil:

Hi

The problem is solved .

Reason is seq stg is not reading the full xml file properly .so, we used path instaed of xml option in xml stg. now its working fine.

thanks for ur contribution criage and Ernie
N R REDDY
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please strive to sustain a professional standard of written English on DSXchange. It makes life easier for those whose first language is other than English.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please mark this thread as Resolved using the green button at the top of this page.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Let this be a lesson to anyone who reads this thread in the future.......DON'T use the Sequential Stage in Parallel Jobs to read XML from disk. It's simply too unpredictable. Variable length strings, stray carriage returns and other xml "noise" characters etc can cause the Sequential Stage to mis-read your file. Use Folder on Server Jobs or External Source for EE. Period. MQ/Oracle/DB2, etc. with XML content are another story.

Thanks Craig, for getting us all back on track with the topology.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply