XML Input Stage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 24
- Joined: Sun Nov 13, 2005 6:14 pm
XML Input Stage
Hello,
Can any one help on the following problem.
Requirement : Xml File To Table or XML file to XML
I tried using sequential stage -> XML Input Stage - Table / Sequential file
Ver 7.5.1A PX Job
I tried using Folder Stage -> XML Input Stage - Sequential file in Server job Ver 7.5.1.A
Records are moving from Sequential stage or Folder stage to XML Input Stage in both jobs BUT the are not processed from XML Input to upstream.
Can any one help on XML Input Stage.
Will be greate if any throw some light on this , and if possible send a sample job to email:. seethamsetty@hotmail.com
Thanks
Can any one help on the following problem.
Requirement : Xml File To Table or XML file to XML
I tried using sequential stage -> XML Input Stage - Table / Sequential file
Ver 7.5.1A PX Job
I tried using Folder Stage -> XML Input Stage - Sequential file in Server job Ver 7.5.1.A
Records are moving from Sequential stage or Folder stage to XML Input Stage in both jobs BUT the are not processed from XML Input to upstream.
Can any one help on XML Input Stage.
Will be greate if any throw some light on this , and if possible send a sample job to email:. seethamsetty@hotmail.com
Thanks
seethamsetty
-
- Participant
- Posts: 437
- Joined: Fri Oct 15, 2004 6:13 am
- Location: Pune, India
If the records are not moving outside XML then that is the problem of XPaths defined in the XML stage.
Providing XML you are reading and XPaths used for columns would be useful to understand the problem and suggest solution. See if there is any diff in the XPaths and XML tags.
This problem is normally the problem in Xpaths. Any errors or warnings in the Director?
Providing XML you are reading and XPaths used for columns would be useful to understand the problem and suggest solution. See if there is any diff in the XPaths and XML tags.
This problem is normally the problem in Xpaths. Any errors or warnings in the Director?
Regards,
S. Kirtikumar.
S. Kirtikumar.
-
- Participant
- Posts: 24
- Joined: Sun Nov 13, 2005 6:14 pm
1. It is Reading the File from Folder Stage.
2. XML Input Stage , Metadata is imported from XML File .
3. But no out is generated.
XPaths are the same that are generated from xml file while loading the columns in output.
Does xpath differ from the originally generated from import.
Kindly help
2. XML Input Stage , Metadata is imported from XML File .
3. But no out is generated.
XPaths are the same that are generated from xml file while loading the columns in output.
Does xpath differ from the originally generated from import.
Kindly help
seethamsetty
-
- Participant
- Posts: 24
- Joined: Sun Nov 13, 2005 6:14 pm
XMLInput Does not send data out
Hi!,
Here is the XML File and Name spaces that i have declared.
[b]Name Space Delcaration :[/b]
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:defns="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
[b]XML File :[/b]
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <NAXML-BusDoc xmlns="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.naxml.org/Retail-EDI/Vocabul ... oice15.xsd" version="1.5">
- <TransmissionHeader>
<TransmissionId>200610041033163</TransmissionId>
<TransmissionDate>2006-10-04</TransmissionDate>
<TransmissionTime>10:33:16</TransmissionTime>
<TransmissionStatus actionType="original" />
</TransmissionHeader>
- <Parties>
- <Supplier>
<Name identType="Customer Vendor Number" ident="99400">MCLANE COMPANY</Name>
</Supplier>
- <Buyer>
<Name identType="Customer Chain Number" ident="425">CHEVRON</Name>
</Buyer>
</Parties>
- <Invoice>
- <Supplier>
<Name identType="Customer Vendor Number" ident="99400">MCLANE</Name>
</Supplier>
- <Location>
<Name identType="Customer Store Number" ident="001483">CHEVRON #1483</Name>
</Location>
<InvoiceNumber>0500282791</InvoiceNumber>
<InvoiceDate>2006-10-03</InvoiceDate>
<Currency code="USD" />
- <InvoiceDetail>
- <LineItem count="1">
- <InvoiceUnit>
<InvoiceUnitId identType="VIN">515478</InvoiceUnitId>
<InvoiceUnitDescription>ARROWHEAD SPRING WTR</InvoiceUnitDescription>
<InvoiceUnitQty cstoreUOMBasis="CA">3</InvoiceUnitQty>
<InvoiceUnitCost currency="USD">7.45</InvoiceUnitCost>
<Taxes taxable="No" />
<LineItemGrossAmt identType="Debit" currency="USD">22.35</LineItemGrossAmt>
<LineItemNetAmt identType="Debit" currency="USD">22.35</LineItemNetAmt>
</InvoiceUnit>
- <RetailUnitPricing>
<RetailUnitId identType="GTIN">071142008582</RetailUnitId>
<RetailUnitQty identType="GTIN" ident="007114207859" UOMBasis="EA">24</RetailUnitQty>
<RetailPrice currency="USD">0.89</RetailPrice>
</RetailUnitPricing>
</LineItem>
- <LineItem count="2">
- <InvoiceUnit>
<InvoiceUnitId identType="VIN">296525</InvoiceUnitId>
<InvoiceUnitDescription>ARRWHD MTN SPRNG WTR</InvoiceUnitDescription>
<InvoiceUnitQty cstoreUOMBasis="CA">4</InvoiceUnitQty>
<InvoiceUnitCost currency="USD">6.14</InvoiceUnitCost>
<Taxes taxable="No" />
<LineItemGrossAmt identType="Debit" currency="USD">24.56</LineItemGrossAmt>
<LineItemNetAmt identType="Debit" currency="USD">24.56</LineItemNetAmt>
</InvoiceUnit>
- <RetailUnitPricing>
<RetailUnitId identType="GTIN">071142000050</RetailUnitId>
<RetailUnitQty identType="GTIN" ident="007114205005" UOMBasis="EA">6</RetailUnitQty>
<RetailPrice currency="USD">1.69</RetailPrice>
</RetailUnitPricing>
</LineItem>
- <LineItem count="3">
- <InvoiceUnit>
<InvoiceUnitId identType="VIN">645408</InvoiceUnitId>
<InvoiceUnitDescription>ARRWHD MTN SPRNG .5 LTR</InvoiceUnitDescription>
<InvoiceUnitQty cstoreUOMBasis="CA">4</InvoiceUnitQty>
<InvoiceUnitCost currency="USD">5.96</InvoiceUnitCost>
<Taxes taxable="No" />
<LineItemGrossAmt identType="Debit" currency="USD">23.84</LineItemGrossAmt>
<LineItemNetAmt identType="Debit" currency="USD">23.84</LineItemNetAmt>
</InvoiceUnit>
- <RetailUnitPricing>
<RetailUnitId identType="GTIN">071142001262</RetailUnitId>
<RetailUnitQty identType="GTIN" ident="007114205126" UOMBasis="EA">4</RetailUnitQty>
<RetailPrice currency="USD">1.99</RetailPrice>
</RetailUnitPricing>
</LineItem>
- <InvoiceSummary>
<InvoiceSubTotals />
- <InvoiceTotals>
<TotalInvoiceUnits count="3" />
<TotalLineItemNetAmt identType="Debit" currency="USD">8522.04</TotalLineItemNetAmt>
- <AllowanceOrCharge>
<AllowanceOrChargeReason identType="SERVICE" quantity="1" />
<ChargeAmt currency="USD">3.4</ChargeAmt>
</AllowanceOrCharge>
<TotalWeight UOMBasis="Pounds">0</TotalWeight>
<TotalTaxes />
<TotalInvoiceDueAmt identType="Debit">8522.04</TotalInvoiceDueAmt>
</InvoiceTotals>
</InvoiceSummary>
</InvoiceDetail>
</Invoice>
</NAXML-BusDoc>
Xpaths used are the same that are generated from XML File using Metadata importer.
Hope this helps to understand the problem.
Thanks in advance.
Here is the XML File and Name spaces that i have declared.
[b]Name Space Delcaration :[/b]
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:defns="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
[b]XML File :[/b]
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <NAXML-BusDoc xmlns="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.naxml.org/Retail-EDI/Vocabul ... oice15.xsd" version="1.5">
- <TransmissionHeader>
<TransmissionId>200610041033163</TransmissionId>
<TransmissionDate>2006-10-04</TransmissionDate>
<TransmissionTime>10:33:16</TransmissionTime>
<TransmissionStatus actionType="original" />
</TransmissionHeader>
- <Parties>
- <Supplier>
<Name identType="Customer Vendor Number" ident="99400">MCLANE COMPANY</Name>
</Supplier>
- <Buyer>
<Name identType="Customer Chain Number" ident="425">CHEVRON</Name>
</Buyer>
</Parties>
- <Invoice>
- <Supplier>
<Name identType="Customer Vendor Number" ident="99400">MCLANE</Name>
</Supplier>
- <Location>
<Name identType="Customer Store Number" ident="001483">CHEVRON #1483</Name>
</Location>
<InvoiceNumber>0500282791</InvoiceNumber>
<InvoiceDate>2006-10-03</InvoiceDate>
<Currency code="USD" />
- <InvoiceDetail>
- <LineItem count="1">
- <InvoiceUnit>
<InvoiceUnitId identType="VIN">515478</InvoiceUnitId>
<InvoiceUnitDescription>ARROWHEAD SPRING WTR</InvoiceUnitDescription>
<InvoiceUnitQty cstoreUOMBasis="CA">3</InvoiceUnitQty>
<InvoiceUnitCost currency="USD">7.45</InvoiceUnitCost>
<Taxes taxable="No" />
<LineItemGrossAmt identType="Debit" currency="USD">22.35</LineItemGrossAmt>
<LineItemNetAmt identType="Debit" currency="USD">22.35</LineItemNetAmt>
</InvoiceUnit>
- <RetailUnitPricing>
<RetailUnitId identType="GTIN">071142008582</RetailUnitId>
<RetailUnitQty identType="GTIN" ident="007114207859" UOMBasis="EA">24</RetailUnitQty>
<RetailPrice currency="USD">0.89</RetailPrice>
</RetailUnitPricing>
</LineItem>
- <LineItem count="2">
- <InvoiceUnit>
<InvoiceUnitId identType="VIN">296525</InvoiceUnitId>
<InvoiceUnitDescription>ARRWHD MTN SPRNG WTR</InvoiceUnitDescription>
<InvoiceUnitQty cstoreUOMBasis="CA">4</InvoiceUnitQty>
<InvoiceUnitCost currency="USD">6.14</InvoiceUnitCost>
<Taxes taxable="No" />
<LineItemGrossAmt identType="Debit" currency="USD">24.56</LineItemGrossAmt>
<LineItemNetAmt identType="Debit" currency="USD">24.56</LineItemNetAmt>
</InvoiceUnit>
- <RetailUnitPricing>
<RetailUnitId identType="GTIN">071142000050</RetailUnitId>
<RetailUnitQty identType="GTIN" ident="007114205005" UOMBasis="EA">6</RetailUnitQty>
<RetailPrice currency="USD">1.69</RetailPrice>
</RetailUnitPricing>
</LineItem>
- <LineItem count="3">
- <InvoiceUnit>
<InvoiceUnitId identType="VIN">645408</InvoiceUnitId>
<InvoiceUnitDescription>ARRWHD MTN SPRNG .5 LTR</InvoiceUnitDescription>
<InvoiceUnitQty cstoreUOMBasis="CA">4</InvoiceUnitQty>
<InvoiceUnitCost currency="USD">5.96</InvoiceUnitCost>
<Taxes taxable="No" />
<LineItemGrossAmt identType="Debit" currency="USD">23.84</LineItemGrossAmt>
<LineItemNetAmt identType="Debit" currency="USD">23.84</LineItemNetAmt>
</InvoiceUnit>
- <RetailUnitPricing>
<RetailUnitId identType="GTIN">071142001262</RetailUnitId>
<RetailUnitQty identType="GTIN" ident="007114205126" UOMBasis="EA">4</RetailUnitQty>
<RetailPrice currency="USD">1.99</RetailPrice>
</RetailUnitPricing>
</LineItem>
- <InvoiceSummary>
<InvoiceSubTotals />
- <InvoiceTotals>
<TotalInvoiceUnits count="3" />
<TotalLineItemNetAmt identType="Debit" currency="USD">8522.04</TotalLineItemNetAmt>
- <AllowanceOrCharge>
<AllowanceOrChargeReason identType="SERVICE" quantity="1" />
<ChargeAmt currency="USD">3.4</ChargeAmt>
</AllowanceOrCharge>
<TotalWeight UOMBasis="Pounds">0</TotalWeight>
<TotalTaxes />
<TotalInvoiceDueAmt identType="Debit">8522.04</TotalInvoiceDueAmt>
</InvoiceTotals>
</InvoiceSummary>
</InvoiceDetail>
</Invoice>
</NAXML-BusDoc>
Xpaths used are the same that are generated from XML File using Metadata importer.
Hope this helps to understand the problem.
Thanks in advance.
seethamsetty
Hi...
I don't know what it is exactly, as I haven't had time to debug it in detail, but I was able to reproduce your issue with only a snippet of the xml, and got it to work by removing the dash in the highest level element
NAXML-BusDoc.
It may not be related at all, but once I removed the dash from the source xml and my XPath, I started retriving the elements and attributes I expected.
Ernie
I don't know what it is exactly, as I haven't had time to debug it in detail, but I was able to reproduce your issue with only a snippet of the xml, and got it to work by removing the dash in the highest level element
NAXML-BusDoc.
It may not be related at all, but once I removed the dash from the source xml and my XPath, I started retriving the elements and attributes I expected.
Ernie
-
- Participant
- Posts: 24
- Joined: Sun Nov 13, 2005 6:14 pm
-
- Participant
- Posts: 24
- Joined: Sun Nov 13, 2005 6:14 pm
Yes --- Craig --- you were right too --- the xml content in the thread above was probably cut/pasted from a browser. Indeed those are "extra" dashes in front.
This one is strange. Hard to say what the actual problem might be. I smelled a rat when the document (on my machine at least) also hangs Internet Explorer. After trying various things, I was able to read at least one element of the document successfully (well --- I get 3000 + rows of data! ) after entirely removing all the namespace info from the initial element, using an external editor.
Is it some value deep in the document? Is it some conflict with the namespace info or specification? Is it just "this" document, or all of them that come from this application? Hard to say. My suggestion to move forward would be to see if the author can leave out the namespaces, or else perhaps try removing them using DS before the string enters the XML Input Stage.
Ernie
This one is strange. Hard to say what the actual problem might be. I smelled a rat when the document (on my machine at least) also hangs Internet Explorer. After trying various things, I was able to read at least one element of the document successfully (well --- I get 3000 + rows of data! ) after entirely removing all the namespace info from the initial element, using an external editor.
Is it some value deep in the document? Is it some conflict with the namespace info or specification? Is it just "this" document, or all of them that come from this application? Hard to say. My suggestion to move forward would be to see if the author can leave out the namespaces, or else perhaps try removing them using DS before the string enters the XML Input Stage.
Ernie
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
He sent me the actual xml document in a separate email. It truly is strange. I've seen some oddities with XML in the past...checking against other "instances" of this document is a good idea, to see if it's something specific in one given set of data. Beyond that, it could be any number of things.
As XML has matured, I'm seeing odd things with the standards less and less, but there have been numerous occasions in the past where a document didn't quite work right because of a standards or structure issue. In those cases it sometimes came down to "how the vendor interprets the standard" (the standards aren't as rigid in some areas as we might expect). ...and the "vendor" in this case could be the author of the document, DataStage, or the open source Apache xerces parser that DataStage uses. Good luck trying to get through that maze and having vendors point fingers at each other to figure it out. You could be a hero, and figure out some very esoteric things about XML, but will have spent many days getting there. Ah, I digress. Perhaps it's not a standards problem at all.
Assuming it's not just this one instance of the document that is somehow corrupted, it may be best to edit the file programmatically as needed, and get the data you need from it (can you say "punt"? ).
Let us know if the job I sent you was "supposed" to retrieve some 3000+ invoice lines. If so, it will be a starting point for you.
Ernie
As XML has matured, I'm seeing odd things with the standards less and less, but there have been numerous occasions in the past where a document didn't quite work right because of a standards or structure issue. In those cases it sometimes came down to "how the vendor interprets the standard" (the standards aren't as rigid in some areas as we might expect). ...and the "vendor" in this case could be the author of the document, DataStage, or the open source Apache xerces parser that DataStage uses. Good luck trying to get through that maze and having vendors point fingers at each other to figure it out. You could be a hero, and figure out some very esoteric things about XML, but will have spent many days getting there. Ah, I digress. Perhaps it's not a standards problem at all.
Assuming it's not just this one instance of the document that is somehow corrupted, it may be best to edit the file programmatically as needed, and get the data you need from it (can you say "punt"? ).
Let us know if the job I sent you was "supposed" to retrieve some 3000+ invoice lines. If so, it will be a starting point for you.
Ernie
-
- Participant
- Posts: 24
- Joined: Sun Nov 13, 2005 6:14 pm