This is reponse to Tom's questions.... probably off-topic for most on the
list that just want technical answers to using the XML toolkit.

I work for a travel agency.  My first XML related project involved parsing
out destination guide content that we recieved in XML format to display on
our web site.  I used SOXML to convert the XML files (one for each country)
to a cf structure, I cleaned up the data a little and then saved it as a
file in wddx format.  Then, I just access the correct file based on a
location id and grab the section of data that I need to display.

Lately, though, I've been dealing with pushing passenger profiles around
using various XML formats that different vendors use as well as pulling
booking data that is in XML and parsing that out.  Unfortunately, the notion
of having a standardized XML representation of passenger profile or an
itinerary isn't used in practice even though there's been a push to create a
standardized DTD by some major industry players.  However, there
specification is over 150 pages long, which is overkill when you just want
to pass around some basic information.

With regards with CF and XML documents, there's two sides of the story.  (1)
Reading in XML documents isn't bad as long as the parsing process is working
properly.  I generally want to convert the XML to a cf struct and then work
with that.  Once it's in CF, I don't have any problems.  I haven't really
gotten too far with XSLT yet, although I've read up on it some and played
around with some samples using SOXML.  Using XSLT at time would probably be
a better, more efficient, cross-implementation (CF/ASP/Java/etc.) way of
doing things, but I'm not that comfortable with it yet.  (2) Writing out XML
files isn't as much fun the way I'm doing it so far.  I've just been
creating templates that have the xml structure that I need and placeholders
that I can replace with the data I need to insert.  For example:

<book>
   <title>@Title@</title>
   <isbn>@ISBN@</isbn>
    @Chapters@
</book>

Where @Chapters@ could be popluated using a separate template since it may
need to be inserted multiple times:

<chapter @attributes@>
    <title>@Title@</title>
    <author>@Author@</author>
</chapter>

As you can see, this isn't the most elegant way of doing things, but it's
been working for me so far.  I'd love to know how others are doing this.

One of my biggest problems with working with XML (and any other technology)
is when I have to use components that I haven't built that I don't
completely understand that fail.  When that happens, I have to rely on
others to hopefully fix a problem for me.  If there's a problem with my
code, no biggie, I just go and fix it.  If there's a problem with the XML
parser I have to make sure I'm not doing anything wrong and hope that my
installations of ColdFusion, the XML parser, custom tag and JRE are correct
and compatible.  If there isn't a problem with my code or installation, then
it's wondering where the problem lies (ColdFusion, the XML parser, custom
tag or JRE) and trying to get help from vendors that may or may not be at
fault.

Thankfully, when there's a problem with one component, there's usually an
alternative solution that I can try.

I'd like to hear anyone else's experiences and/or insights in using CF with
XML (how you're using it, what tools have been helpful, etc.)  I'd also love
to hear if anyone is using XML on the database side... I've seen articles
talking about SQLXML, but am not familiar with what this is.

~Nelson



----- Original Message -----
From: "Schreck, Tom" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 23, 2002 3:56 PM
Subject: RE: [cf-xml] CF5 and MSXML


Nelson
SOXML relies on CFOBJECT to instantiate the XML Parser (Microsoft's
version).  Cf_XMLParser uses XERCES which is a Java based parser.  I
know CF has memory leak issues with CFOBJECT, however, I've heard they
have a patch out or will soon.

How do you like working with CF and XML documents?  What type
applications are you using XML and CF?

Thanks -

Tom Schreck
817-252-4900
[EMAIL PROTECTED]

I have not failed.  I've found 10,000 ways that won't work.

- Thomas Edison


-----Original Message-----
From: Nelson Winters [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 23, 2002 3:01 PM
To: [EMAIL PROTECTED]
Subject: Re: [cf-xml] CF5 and MSXML

Tom,

Thanks for the suggestion.  I made the change you recommended, but
unfortunately there was no improvement in performance.

What's happens is the first time I run the script (with or without your
recommend change) is that it (cf_soxml) takes about 3,000-5,000 ms to
convert the xml string to a cf structure.  Unfortunately, on subsequent
calls to the same script, it takes longer and longer to process.  After
running the script about 15 times, it's over 100,000 ms to parse the
same
xml packet.  Nothing else is running on the server during this testing
and
the processing time always gradually increases with each subsequent
call.

On a positive note, I've installed the cf_XMLParser from www.cfdev.com
and
it's parsing the same XML packet in under 500 ms and appears to be quite
stable.  The only downside that I've found so far is that it uses a
different structure layout to represent the same XML data, which meant I
had
to rework some of the code I had.  Not a major ordeal though.

If anyone has any other suggestions, I'd love to hear them and try them
out.

Thanks again,

Nelson




----- Original Message -----
From: "Schreck, Tom" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 23, 2002 2:06 PM
Subject: RE: [cf-xml] CF5 and MSXML


Try changing the Attributes.ProgID from Microsoft.XMLDom in soxml tag to
the following:

<cfparam name="Attributes.ProgId" default="MSXML2.DOMDocument.3.0">


Thanks -

Tom Schreck
817-252-4900
[EMAIL PROTECTED]

I have not failed.  I've found 10,000 ways that won't work.

- Thomas Edison


-----Original Message-----
From: Nelson Winters [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 23, 2002 11:50 AM
To: [EMAIL PROTECTED]
Subject: [cf-xml] CF5 and MSXML

I'm trying to use the CF_SOXML tag with CF5, but am running into
problems
with this combination.  I moved the code to a CF4.5 server and it works
perfectly.  Unfortunately, I need the code to be on the CF5 server.

After looking in the forums at www.siteobjects.com and in the archives
for
this list
(http://www.mail-archive.com/[email protected]/msg00033.html),
I've
discovered that I'm not the first to run into this problem (surprise,
surprise).

I'm using the tag to simply convert an XML packet and convert it into a
CF
structure (action="XML2CF" for those of you familiar with the tag).  I
was
wondering if anyone has been able to resolve this issue or could
recommend
an alternative solution that would accomplish the same thing for me?

I'm about to try CF_XMLParser from CFDev.com.  Unfortunately, the
structures
that it builds is a little different than what CF_SOXML builds, which
will
mean that I'll have to modify my code somewhat.

Nelson



-----------------------+
cf-xml mailing list
list: [EMAIL PROTECTED]
admin: [EMAIL PROTECTED]
home: http://torchbox.com/xml

-----------------------+
cf-xml mailing list
list: [EMAIL PROTECTED]
admin: [EMAIL PROTECTED]
home: http://torchbox.com/xml



-----------------------+
cf-xml mailing list
list: [EMAIL PROTECTED]
admin: [EMAIL PROTECTED]
home: http://torchbox.com/xml

-----------------------+
cf-xml mailing list
list: [EMAIL PROTECTED]
admin: [EMAIL PROTECTED]
home: http://torchbox.com/xml



-----------------------+
cf-xml mailing list
list: [EMAIL PROTECTED]
admin: [EMAIL PROTECTED]
home: http://torchbox.com/xml

Reply via email to