Page 1 of 1

XML Information

Posted: Mon May 24, 2010 11:41 pm
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

Posted: Tue May 25, 2010 5:13 am
by chulett
First correct your job design, particularly how you read from the source.

Posted: Tue May 25, 2010 7:33 am
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?

Posted: Tue May 25, 2010 9:34 am
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

XML Information

Posted: Tue May 25, 2010 10:02 pm
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

Posted: Tue May 25, 2010 10:27 pm
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?

XML Information

Posted: Tue May 25, 2010 11:22 pm
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

Posted: Tue May 25, 2010 11:27 pm
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.

XML Information

Posted: Wed May 26, 2010 1:25 am
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

Posted: Wed May 26, 2010 4:03 am
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

Posted: Wed May 26, 2010 6:42 am
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:

XML Information

Posted: Wed May 26, 2010 9:39 pm
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

Posted: Wed May 26, 2010 10:04 pm
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.

Posted: Wed May 26, 2010 10:04 pm
by ray.wurlod
Please mark this thread as Resolved using the green button at the top of this page.

Posted: Thu May 27, 2010 7:02 am
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