Focal Point
parse xml data in webfocus

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9581028331

January 25, 2005, 06:21 PM
Kamesh
parse xml data in webfocus
Hi,
Having an xml data of length 2000 and trying to parse the data in webfocus.

Anybody know how we can do this, Please let me know.

Thanks
Kamesh
January 25, 2005, 09:13 PM
N.Selph
In 5.21 there is an XML adapter- you can create a master file from a dtd.
January 26, 2005, 02:32 AM
Kamesh
can you explain me how we can do this?
January 26, 2005, 02:53 PM
N.Selph
Are you in a hub-sub environment? Can you log onto your server console?
January 26, 2005, 06:33 PM
Kamesh
hub-sub environment - ????

I'm having access to see server console.
January 26, 2005, 10:35 PM
N.Selph
Can you go to "DATA Adapters", then "ADD", and find XML in the list of adapters available? After you add it, you can go to "Metadata" then "Add" and see the XML adapter there. You choose that and pick the directory where you have a dtd that describes the xml file. From there it will create a master file.
You should be able to find more information in the console's help screens. In my version it is under "Server Administration", "Configuring Data Adapters", "Data Adapter for XML".
January 27, 2005, 12:34 PM
TexasStingray
The XML adapter is a great feature not only can you use XML as a datasource, but webfocus can publish out data as an xml document. Just be sure that you are licensed to use it.
January 28, 2005, 04:22 PM
Kamesh
Hi,
I'm not able to do the way you mentioned bcoz we don't have DTD. We are storing xml data's in a field of varchar 2000 in DB2 database.

I'm able to retrieve the data through sql but it consists an xml tags. I want to parse this xml and get the information needed.

Thanks
Kamesh
January 28, 2005, 05:41 PM
N.Selph
Search the IBI Knowledge Base for an article entitled:
"Reporting XML Content of a Data Source".
Also in the 5.32 documentation is:
"Create a Synonym to Access XML Documents From Relational DBMS CLOB Fields".

I haven't done this myself, but this sounds like what you are wanting to do.
January 28, 2005, 06:15 PM
j.gross
Maintain had some pretty neat text manipulation capabilities. I 've used it in similar situations to construct a filters that parse long records into component parts, and store them in an appropriate structure.
January 28, 2005, 07:02 PM
Kamesh
Can we use Maintain in our regular webfocus code?
Or else do we need to add any patch on our webfocus server.
January 28, 2005, 07:19 PM
Bob Jude Ferrante
Maintain is part of the standard WebFOCUS server functionally - meaning, you can developed maintain apps with DevStudio and DevStudio gives you a single-use license for development.

When it's time to deploy applications that use it you will need to license it. But it's not expensive and well worth the license fee.
January 28, 2005, 07:26 PM
j.gross
There's nothing to install (it's there in the server) -- but lot's of learning curve -- and there may be a license issue. Check with the saleman. (I cannot speak for IBI - I am no longer their employee.)

Note that Maintain has several flavors. This (data filters and transforms) is the non-persistent kind of maintain, and without any use of the presentation features (winforms).
February 01, 2005, 01:08 AM
Kamesh
Hi,
Somewhat I'm able to parse it upto some extent. I used POSIT to point some tag and from there used substring to retrieve each character occurence until I reach '<' . Then using MODIFY, I'm updating this to an table. It's working fine but if I have more records, getting an error "Out of Memory" error.

-Kamesh