Page 1 of 1

XML Parser Issue

Posted: Tue Jan 17, 2012 10:03 am
by venkatvelpula
Hi,

I am trying to use new XML parser stage to parse the XML file and write that into a dataset. Part of the configuration, How do we input the document root?

Posted: Tue Jan 17, 2012 12:17 pm
by eostic
You first have to "import" your xml schema defintion (xsd) via the "Library Manager" (you'll see this tab inside the stage assembly, or at the DS Designer main canvas when you do Import....Table Definitions)....

Once you have the xsd properly imported, you will be able to select the docuement root. Open a sample document and look at the very first element...that is generally your root.

Ernie

Posted: Tue Jan 17, 2012 1:13 pm
by venkatvelpula
eostic wrote:You first have to "import" your xml schema defintion (xsd) via the "Library Manager" (you'll see this tab inside the stage assembly, or at the DS Designer main canvas when you do Import....Table Defin ...
I couldn't see full message..could you allow me to look at the full message?

Posted: Tue Jan 17, 2012 1:26 pm
by eostic
...the answer is in the content that you can see.

Posted: Tue Jan 17, 2012 1:36 pm
by venkatvelpula
I have imported XML table definitions but trying to provide document root to configure XML stage to parse the input file.

How import table definitions related to the document root?

Posted: Tue Jan 17, 2012 2:25 pm
by satisht
The document root should be the top level element that you are parsing. Lets say if there is a envelope, header and body in the message. If you want to parse the Envelope you should select Envelope in the root and in the next parse step if you want to parse the header then you shiould choose Header as the root and so on...The root can be selected by using the Browse option...

Posted: Tue Jan 17, 2012 2:41 pm
by eostic
...import the xsd to a Library (not via xml table definitions).

Posted: Tue Jan 17, 2012 3:50 pm
by venkatvelpula
can you tell me how to create the xsd to a library whican can be later accessed from xml stage?

Posted: Tue Jan 17, 2012 7:12 pm
by eostic
if you don't have one, you'll need to create one. One way is to look for "trang". ...or use the old xml Stages. If you don't have an excessive amount of volume, or you don't have an xsd or the detailed requirements (like deep validation) that would demand one, then use xmlInput.

That has its own learning curve, but it's probably simpler than trying to tackle xsd's for the first time while also learning a new Stage.

Ernie

Posted: Wed Jan 18, 2012 10:33 am
by venkatvelpula
Finally, I have created XSD and pointing that for document root. I am fine with this. When I am running the job, I am encountering no issues but not getting anything on the ouput.

Try to use test data funtion to see assembly editor configuration works. Could you provide how can we test the parser settings inside the stage? How to provide test data and see the results with in the stage?

Posted: Wed Jan 18, 2012 12:17 pm
by eostic
Change your validation setting...it's probably on minimal. That may help find the problem.

Ernie

Posted: Thu Jan 19, 2012 9:52 am
by venkatvelpula
I figured out the issue. Everything working fine. Thanks for your help.

Posted: Thu Jan 19, 2012 3:03 pm
by ray.wurlod
Please share the resolution. That's what DSXchange is about. If someone else gets the same problem in the future, your solution will be there for the searching! :)