Symeon is right; the various XML tools in U2 are actually pretty good and
the DOM parser is entirely written to standards.

The real problem is that the documentation for them is frankly terrible and
there is no good overview on which tools should be used in which

Hmm, sounds like I should post something up to date (now why didn't I keep
my mouth shut)..


-----Original Message-----
[] On Behalf Of Symeon Breen
Sent: 28 January 2012 09:28
To: 'U2 Users List'
Subject: Re: [U2] UniVerse Import XML data [not-secure]

The xml tools in u2 do allow very easily the extraction of certain elements
and attributes from xml files.  I have just the one 100 line databasic
program, I supply it the path to an xml file, the path to the .ext
extraction file, it then returns a dynamic array. Sometimes if you want to
go through more than 3 levels of nesting you have to recurs, but you would
have to do that anyway for MV data.

Like any xml processor the xml underneath has to be valid.  If the xml has
incorrect structure, a namespace that does not exist, a character set
mismatch it will fail , it will fail in php, java, .net, or U2   

The guys at u2 did NOT write their own xml parser, they use the libraries
from the OS,  so on udt on linux, 7.1 used libxml, 7.2 uses libxerces - just
the same as php, or java, or the linux xml tools, like xmlwf.  So if it
fails in u2 it will fail in php.

-----Original Message-----
[] On Behalf Of David Jordan
Sent: 27 January 2012 20:55
To: U2 Users List
Subject: Re: [U2] UniVerse Import XML data [not-secure]

Hi Tony
I partly agree with you.  But I should be able to process xml data in
UniVerse far simpler than at the moment.  I should not have to read xml in
one application, convert it to a dynamic string and then send it to
universe/unidata, I should just be able to do it one step.   This is a
failing of Rocket to provide suitable interfaces to unibasic.

David Jordan

-----Original Message-----
[] On Behalf Of Tony Gravagno
Sent: Saturday, 28 January 2012 4:40 AM
Subject: Re: [U2] UniVerse Import XML data [not-secure]

From: John Thompson
> This is where I think languages like php get it right. 
> Their simple XML stuff makes it simple to parse even the junk you may 
> get from somewhere else.

I've commented here and blogged on this topic a number of times.
I shake my head at the pain people continually subject themselves to when
trying to force the square peg of XML into the round hole of Pick BASIC just
because that's the comfort zone.  There are any number of other tools out
there specifically designed to work with XML.  If you go to many other
forums, developers aren't focused on the XML processing.  They deftly
convert to/from XML (and JSON) without a problem, and their questions are
largely focused on what to do with the data.  MV professionals need to shift
focus from doing everything within the MVDBMS to making the best use of all
tools available and integrating the MVDBMS with whatever utility does the
job that's required.  At the core of it, even when using external tools we
convert XML to "something"
and that "something" ultimately needs to be saved in an MV structure.
(Similarly for outbound XML.)  But if you're focused on namespaces and
attributes then the tools you're using aren't providing adequate abstraction
from the XML, and you might want to consider tools that convert XML to
"something else" which is easier for you to use.

> The reality is, that there are a lot of sites and places out there 
> that will send you all kinds of xml, and I found that since I was not 
> proficient at "massaging" those "non-standard" feeds into what the
> U2 xml tools wanted, I just found it easier to do it another way.

Whoe - stop right there.  I tend to angle away from DBMS-oriented tools for
processing XML, but in all fairness we can't expect any tool to behave
properly if the data doesn't conform to standards.
No, I haven't seen "a lot of sites" sending "all kinds of XML"
that is "non-standard".  If you have a trading partner that doesn't produce
or consume industry-standard documents, you need to talk with their IT
people, and escallate to management on both sides if you're not getting

Respectfully, I'm guessing you're just not familiar with some of the details
of XML, and when the U2 tools don't seem to address one of those details I'm
guessing you're considering the document to be non-standard rather than the
U2 tools.  Again, in all fairness to the U2 team, I'm guessing this is a
documentation issue or some lack of understanding along the way rather than
any entity being non-standard.  If indeed the U2 tools aren't providing
standard functionality, well, see paragraph 1 above.

Good luck.

Tony Gravagno
Nebula Research and Development
Nebula R&D sells mv.NET and other Pick/MultiValue products worldwide, and
provides related development services Visit! Contribute!

U2-Users mailing list
U2-Users mailing list

No virus found in this message.
Checked by AVG -
Version: 10.0.1416 / Virus Database: 2109/4770 - Release Date: 01/27/12

U2-Users mailing list

U2-Users mailing list

Reply via email to