XML Parser Issue
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 80
- Joined: Sat Mar 18, 2006 10:27 pm
XML Parser Issue
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?
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?
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
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
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>
-
- Participant
- Posts: 80
- Joined: Sat Mar 18, 2006 10:27 pm
...the answer is in the content that you can see.
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>
-
- Participant
- Posts: 80
- Joined: Sat Mar 18, 2006 10:27 pm
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...
...import the xsd to a Library (not via xml table definitions).
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>
-
- Participant
- Posts: 80
- Joined: Sat Mar 18, 2006 10:27 pm
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
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
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>
-
- Participant
- Posts: 80
- Joined: Sat Mar 18, 2006 10:27 pm
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?
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?
Change your validation setting...it's probably on minimal. That may help find the problem.
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>
-
- Participant
- Posts: 80
- Joined: Sat Mar 18, 2006 10:27 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.