I'm working with a vendor to troubleshoot an error and he's asked me to
*not* replace with amp; etc in a URL field. I'm building an XML doc
with xmlnew() and then posting it with cfhttp method=post and I'm not
explicitly calling urlencodedformat() or anything. CF is just automatically
and (I
CDATA: MyXMLObj.MyXMLChild[1].XMLCData=http://myurl.com?x=ya=b';
Most XML libraries for other languages will read CDATA just like they would a
non-escaped node.
On Jun 17, 2014, at 2:33 PM, John M Bliss bliss.j...@gmail.com wrote:
I'm working with a vendor to troubleshoot an error
ttp://myurl.com?x=ya=b';
Most XML libraries for other languages will read CDATA just like they
would a non-escaped node.
On Jun 17, 2014, at 2:33 PM, John M Bliss bliss.j...@gmail.com wrote:
I'm working with a vendor to troubleshoot an error and he's asked me to
*not* replace with amp
PM, Jon Clausen jon_clau...@silowebworks.com
wrote:
CDATA: MyXMLObj.MyXMLChild[1].XMLCData=èttp://myurl.com?x=ya=b';
Most XML libraries for other languages will read CDATA just like they
would a non-escaped node.
On Jun 17, 2014, at 2:33 PM, John M Bliss bliss.j...@gmail.com wrote
CDATA: MyXMLObj.MyXMLChild[1].XMLCData=èttp://myurl.com?x=ya=b';
Most XML libraries for other languages will read CDATA just like they would a
non-escaped node.
I'm pretty sure that this will only work for element values, not
attribute values. I'm not sure whether John's using
Element. This changed my XML from this:
Urlhttp://myurl.com/?x=yamp;a=b/Url
...to this:
Url![CDATA[ http://myurl.com/?x=ya=b]]/Url
...which, I guess, was the desired effect. Now, response I'm getting has
changed to, URL 'http:// http://myurl.com/?x=ya=b' is not in the expected
format
SOLVED: URL had leading space. trim() fixed it. Thanks! :-)
On Tue, Jun 17, 2014 at 3:10 PM, John M Bliss bliss.j...@gmail.com wrote:
Element. This changed my XML from this:
Urlhttp://myurl.com/?x=yamp;a=b http://myurl.com/?x=ya=b/Url
...to this:
Url![CDATA[ http://myurl.com/?x=ya=b
result=httpResponse
cfhttpparam type=header name=content-type value=text/xml
cfhttpparam type=header name=charset value=utf-8
cfhttpparam type=header name=content-length
value=#len(signOnSoap)#
cfhttpparam type=header name=connection value=close
cfhttpparam type=header
Hello Sasha. Try this...
cfset results = reReplace(httpReponse.FileContent, ^[^]*, , ALL)
cfset results = xmlParse(results)
cfdump var=#results#
Hope this helps... Che
~|
Order the Adobe Coldfusion Anthology now!
=httpResponse
cfhttpparam type=header name=content-type value=text/xml
cfhttpparam type=header name=charset value=utf-8
cfhttpparam type=header name=content-length
value=#len(signOnSoap)#
cfhttpparam type=header name=connection value=close
cfhttpparam type=header
Hi Che,
Thank you for your advice, but unfortunately it didn't help. Here is an
error I got:
An error occured while Parsing an XML document.
Element or attribute do not match QName production:
QName::=(NCName':')?NCName.
Sincerely,
Sasha.
-Original Message-
From: Che Vilnonis
=httpResponse
cfhttpparam type=header name=content-type
value=text/xml
cfhttpparam type=header name=charset value=utf-8
cfhttpparam type=header name=content-length
value=#len(signOnSoap)#
cfhttpparam type=header name=connection value=close
cfhttpparam type
Next, I do realize that I need to remove the two lines at the very top and
bottom that contain --uuid ...) and the first three lines
after the first boundary marker which are part of the response header. The
problem here is that simply using Replace() function to
replace those lines with
to
have to go back try again :) Round two.
Matt
-Original Message-
From: Dave Watts [mailto:dwa...@figleaf.com]
Sent: Thursday, May 09, 2013 12:58 PM
To: cf-talk
Subject: Re: Parsing XML response from web services with ColdFusion
DeserializeJSON
Next, I do realize that I need to remove
Hi Guys,
(Sorry I may have already posted this on my really old login so aplogies for
the repost)
We had to reboot an old Win2K box which is running MX 6.1.
Since the reboot all CF pages are rending as white pages, no source/markup etc.
Including /cfide/Administrator.
When looking at the
all those neo files get backed up automatically when they change, so look
for a backup copy in the same folder.
I would also strongly suggest you consider taking backups of your server.
On Mon, Dec 31, 2012 at 12:37 PM, Ian Chapman ian.chap...@melodimedia.co.uk
wrote:
Hi Guys,
(Sorry I
Hi All -
I am parsing rss feed. The feed has custom data and custom data can have
duplicate attributes. I am following the example at
http://www.raymondcamden.com/index.cfm/2008/4/23/Ask-a-Jedi-Handling-RSS-feeds-with-custom-data.
For example if the feed has following data, and the last
It should be available as an array under the node. Can you share the full
URL of the feed? If so I can make a demo for you.
On Wed, Dec 5, 2012 at 2:41 PM, fun and learning funandlrnn...@gmail.comwrote:
item
titlePennsylvania Primary Roundup/title
descriptionBarack Obama improved his
Ray,
Thanks for the suggestion on keys being available as array under the node.
I was able to get the values for duplicate keys. Below is the code I used,
I guess it can be improved upon
cfloop index=x from=1 to=#arrayLen(xmlResult.rss.channel.item)#
cfset valueList =
cfset count = 0
cfset idx
I was presented with some questions regarding XML and was wondering if there
are any setting in Coldfusion to
disable any of these or I do not need to worry about it since we do not use
any XML in our code:
1. How application employs methods for XML schema validation.
2. How
I was presented with some questions regarding XML and was wondering if there
are any setting in Coldfusion to disable any of these or I do not need to worry
about it since we do not use any XML in our code:
1. How application employs methods for XML schema validation.
2. How application
with some questions regarding XML and was wondering if there
are any setting in Coldfusion to disable any of these or I do not need to
worry about it since we do not use any XML in our code:
1. How application employs methods for XML schema validation.
2. How application disables use
I don't want to sound stupid but how does regex work? I could use something
similar to this and always fall flat on my face every time someone mentions
regex
Ken Hammond
IT Director
The Salem Group
Phone: 630-873-3018
Fax: 630-932-7010
Email: khamm...@saleminc.com
www.saleminc.com
On
Apparently, after a billion hours of trying to figure out why I
couldn't successfully output some xml data, it seems that the
unicode: 0x1a character is contained in a text string and making it
fail.
#xmlformat(thestring)# does not successfully strip it from the string.
How can I get rid
Have you tried a regex replace of \x1a ? It *might* work. Worth a shot anyway.
-Leigh
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
On 2/24/2012 2:04 AM, Leigh wrote:
Have you tried a regex replace of \x1a ? It *might* work. Worth a shot
anyway.
and there are several other codepoints that are illegal in XML. probably should
sweep them all away. these are supposed to be a-ok for XML:
#x9 | #xA | #xD | [#x20-#xD7FF
Hi, all...
I've been banging my head against this XML wall for over
a week now and either I just don't get it or what I'm trying
to do is not possible given what the vendor is providing.
The vendor of product info provides 3 ways to access product
information:
Categories, Product within those
Subject: Is what I'm trying to do with XML even possible?
Hi, all...
I've been banging my head against this XML wall for over a week now and
either I just don't get it or what I'm trying to do is not possible given
what the vendor is providing.
The vendor of product info provides 3 ways to access
possible. However, you probably don't want to do
it all at runtime, if information doesn't change that frequently. For
example, I doubt that the categories change every day.
So, here's what I'd do.
1. Fetch the XML files periodically, based on their Last-Modified date
if they have one.
2. Read
In trying to achieve step number 1, I tried to create a document
on my hard drive. Should this code not create an xml document
on my e: drive?
cfscript
URLToPull = 'http://lennox.com/api/v1/z7RRSHM/categories/';
/cfscript
cfhttp url = '#URLToPull
to create a document
on my hard drive. Should this code not create an xml document
on my e: drive?
cfscript
URLToPull = 'http://lennox.com/api/v1/z7RRSHM/categories/';
/cfscript
cfhttp url = '#URLToPull#'
method = 'get
In trying to achieve step number 1, I tried to create a document
on my hard drive. Should this code not create an xml document
on my e: drive?
All you need to fetch a file is a single CFHTTP with the PATH and FILE
attributes.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http
Hopefully, the error of my ways will be obvious to thos
of you who work with xml a lot, but...HELP!!!
Given this demo xml:
?xml version=1.0?
Products
Category ID=1Air Conditioners/Category
SubCategory ID=1
SubCategoryNameAir Conditioners/SubCategoryName
Rick,
I generally find the easiest way to work through an XML doc is to create a
page that just converts it to an XMLDOC first using cfxml or xmlparse()
and them CFDUMP the result.
This makes it must easier to find the node references you need to loop
through or reference.
I also prefer
What are the values of xmllennox in the xml page (or what is it supposed to
be derived from)? And what is the search trying to search for?
-Original Message-
From: Rick Faircloth [mailto:r...@whitestonemedia.com]
Sent: Sunday, January 01, 2012 3:53 PM
To: cf-talk
Subject: RE: XML
for the feedback!
Rick
html
head
titleLennox XML Search Test/title
/head
body
h1xmlSearch()/h1
cfset xmlLennox = xmlParse(expandPath('lennox-products.xml'))
cfoutput
table border='1' cellpadding='2' cellspacing='0'
tr
Try searching directly for the modelName:
cfset result = xmlSearch(xmllennox-products,//modelName)
Dump that result to see how to get the name.
--
Shu Ha Ri: Agile and .NET blog
http://www.bifrost.com.au/
On 2 January 2012 09:18, Rick Faircloth r...@whitestonemedia.com wrote:
At this
BTW, the issue with the existing code is this:
xmllennox-products
CF thinks you are trying to do maths on xmllennox and products by
subtracting one from the other.
--
Shu Ha Ri: Agile and .NET blog
http://www.bifrost.com.au/
On 2 January 2012 10:10, James Holmes james.hol...@gmail.com
out how to loop
through the products.
Clues for the cluesless?
Rick
PS - you can see the cfdumps in the code to show
the actual XML I'm trying to work with. I've seen
examples of the XML data put into a database and then
worked with from there. Would that be preferable?
cfscript
Okay... I've worked this every way I can think
of and, I admit it, I just don't get it.
Hi Rick, replace your inner-most loop with the following. It should
get you going in the right direction. It looks like there is another
layer of sub-categories which needs to be accounted for:
!--- Loop
If you are just after products, you can dramatically simplify the code by
using xmlsearch() to get them with xpath instead of manually looping
multiple levels down.
--
Shu Ha Ri: Agile and .NET blog
http://www.bifrost.com.au/
On 31 December 2011 08:50, Justin Scott leviat...@darktech.org
Thanks for the tip, Justin! I'll give it a try!
Rick
-Original Message-
From: Justin Scott [mailto:leviat...@darktech.org]
Sent: Friday, December 30, 2011 7:51 PM
To: cf-talk
Subject: Re: XML! Aaargh! How do I do this?
Okay... I've worked this every way I can think
of and, I admit
Thanks for the info, James!
I had actually been doing some more research on
CF and XML and was reading about xmlSearch. I'll
give that try, too.
Rick
-Original Message-
From: James Holmes [mailto:james.hol...@gmail.com]
Sent: Friday, December 30, 2011 8:14 PM
To: cf-talk
Subject: Re
If you don't care about the form of the XML, you can also use WDDX to
do the conversion in one quick call.
On Wed, Dec 14, 2011 at 10:53 PM, Mike Kear afpwebwo...@gmail.com wrote:
IF you use cfdump var=#form# / you should see a struct called form
with each of your form fields
:
colCount = listLen(form.align);
xml = ;
for (i = 1; i LTE colCount; i++) {
xml = column;
xml = align#listGetAt(form.align, i)#/align;
xml = dname#listGetAt(form.dname, i)#/dname;
...
xml = /column;
}
xml = columns#xml#/columns;
On 12/14/11 8:43 PM, Tom Jones wrote
Hello,
I have been searching all over cf-talk archives and on google and I don't see a
good example on how to save form data to a xml file.
So what I'm doing right now is, I have a xml file and read that and then
display it in a form so the it can be edited. Here is an example on what I'm
So, if you have an arbitrary number of columns and when you submit the
form you get:
form.align=left,left,...
form.dname=Agent Version,Allow Client,...
then you can do:
colCount = listLen(form.align);
xml = ;
for (i = 1; i LTE colCount; i++) {
xml = column;
xml = align#listGetAt
IF you use cfdump var=#form# / you should see a struct called form
with each of your form fields and their settings from the submitted form.
If you use Daniel Gaspar http://www.danielgaspar.com/'s ANYTHINGXOXML.cfc
you can automatically convert it to XML without any effort.
http
This is disabled by default, you need to enable it via a Java System
Property, see details here: http://www.petefreitag.com/item/718.cfm
--
Pete Freitag - Adobe Community Professional
http://foundeo.com/ - ColdFusion Consulting Products
http://petefreitag.com/ - My Blog
http://hackmycf.com - Is
Coldfusion 9, just started has been working fine on all the websites until
today when using FCKEditor to browse server for an image.
Any Ideas?
Java recently Updated.
Terry
~|
Order the Adobe Coldfusion Anthology now!
No the code does not write to file system. However, it reads a config
file and a PFX certificate file to generate the XML signature.
Isidro
On 10/21/11 9:53 PM, Dave Watts dwa...@figleaf.com wrote:
I am invoking a java method that will generate an xml signature. I
successfully invoke
Hello all,
I am invoking a java method that will generate an xml signature. I successfully
invoke and define the method, however if the method if the code is run more
more than once, the first user gets the XML signature the second user gets the
error XML signature generation failed. Can
I am invoking a java method that will generate an xml signature. I
successfully invoke and define the method, however if the method if the code
is run
more more than once, the first user gets the XML signature the second user
gets the error XML signature generation failed. Can anyone
Hi all
I tried to parse the XML from the following feed as I normally do and kept
getting error messages (not defined) on everything I tried.
http://feeds.jobs2web.com/feeds/view?siteId=246feedId=682
Here are a few snippets that I tried:
cfset xmldoc =
XmlParse(http://feeds.jobs2web.com
Jobs is capitalized in the XML.
This works:
cfset myxmldoc = XmlParse(
http://feeds.jobs2web.com/feeds/view?siteId=246feedId=682;)
cfset title = XmlSearch(myxmldoc, /Jobs/job/title)
cfdump var=#title#
On Wed, Sep 21, 2011 at 9:02 AM, Torrent Girl moniqueb...@gmail.com wrote:
Hi all
I
are you sure that CF is actually getting the XML ?
try grabbing it with CFHTTP first instead just to make sure.
On Wed, Sep 21, 2011 at 2:02 PM, Torrent Girl moniqueb...@gmail.com wrote:
Hi all
I tried to parse the XML from the following feed as I normally do and kept
getting error
and the client owns the code. The best I can suggest is
to look at phRets and decided if you want to use that or rewrite that to
ColdFusion.
The thing to remember it that it's all XML. NExt you have to make http calls
to get the meta data, then parse that out then do another http call to get
I need to convert over a couple of real estate website that
are currently receiving MLS data via an hourly FTP feed.
The new system handed down by the National Association of
Realtors is RETS http://www.rets.org/.
Do any of you know if there are any CFC functions out there
that would make
. The best I can suggest is to
look at phRets and decided if you want to use that or rewrite that to
ColdFusion.
The thing to remember it that it's all XML. NExt you have to make http calls
to get the meta data, then parse that out then do another http call to get the
next level meta data
Here is what I am running into. I have a web form that takes in the info I
need. I process the form on the next page and it creates an XML document
that I need (which is being created successfully). I need to display
something back to the end user telling them it's been created. After my
can you post the code here
http://pastebin.com/
http://pastebin.com/
On Fri, May 13, 2011 at 5:43 PM, Ken Hammond khamm...@saleminc.com wrote:
Here is what I am running into. I have a web form that takes in the info I
need. I process the form on the next page and it creates an XML
Here is what I am running into. I have a web form that takes in the info I
need. I process the form on the next page and it creates an XML document
that I need (which is being created successfully). I need to display
something back to the end user telling them it's been created. After my
my guess is that you have answered your question by saying that you could use a
cflocation tag.
Alternatively, if you trust your xml scrip to always create the xml document
without errors, you may use a prompt to display your activity status just
before
you use the xml script.
Best Regrads
Hi all.
I have been able to output my values from the xml (YAY!!) using xmlSearch
(Thanks Guys).
Here is my code:
cfscript
myxmldoc =
XmlParse(E:\domains\aawit.net\wwwroot\Microsoft-Diversity-AAWIT116obs.xml);
title= XmlSearch(myxmldoc, /jobs/job/title);
location = XmlSearch
If you're using SQL Server, it'll auto-handle the XML directly with no
pre-parsing with CF (SEE
http://msdn.microsoft.com/en-us/library/ms186918.aspx ):
cfstoredproc procedure=BulkInsert
cfprocparam type=In cfsqltype=CF_SQL_LONGVARCHAR
value=#varContainingXML#
/cfstoredproc
PROCEDURE
stick it inside a cfsavecontent
--
Russ Michaels
www.bluethunderinternet.com : Business hosting services solutions
www.cfmldeveloper.com: ColdFusion developer community
www.michaels.me.uk : my blog
www.cfsearch.com : ColdFusion search engine
**
*skype me*
how to pass file name to the bulkload when sqlserver and
coldfision servers are on different physical servers; The following xml load
works when both SQl and CF servers are residing on the same physical server.
- How I can refer to the local file where sqlserver can access it?
- Any
; The following xml load
works when both SQl and CF servers are residing on the same physical server.
- How I can refer to the local file where sqlserver can access it?
- Any alternative ways?
Thanks
K
EXEC('
INSERT INTO [ProjectXML](Code, Reference, xmlFileName, [xmlDocument])
SELECT
\filename
Steve
Sent from my iPhone
On May 3, 2011, at 12:48 AM, Kam Heydari heyda...@yahoo.com wrote:
Hi,
Anyone know how to pass file name to the bulkload when sqlserver and
coldfision servers are on different physical servers; The following xml load
works when both SQl and CF servers
Hello all.
I am trying to parse thru an XML feed using the method that I always use and
it's not working:
Here is my code:
cfset getJobs =
'http://www.microsoft-careers.com/Microsoft-Diversity-AAWIT116obs.xml'
cfhttp url=#getJobs# method=GET timeout=1/cfhttp
!--- Read the file
Are you sure that someone didn't screw up the XML in the file?
-Original Message-
From: Torrent Girl [mailto:moniqueb...@gmail.com]
Sent: Tuesday, May 03, 2011 12:15 PM
To: cf-talk
Subject: MS XML Parse
Hello all.
I am trying to parse thru an XML feed using the method that I always
, Torrent Girl wrote:
Hello all.
I am trying to parse thru an XML feed using the method that I always use and
it's not working:
Here is my code:
cfset getJobs =
'http://www.microsoft-careers.com/Microsoft-Diversity-AAWIT116obs.xml'
cfhttp url=#getJobs# method=GET timeout=1/cfhttp
On 5/3/2011 9:14 AM, Torrent Girl wrote:
cfset getJobs =
'http://www.microsoft-careers.com/Microsoft-Diversity-AAWIT116obs.xml'
That looks to be a pretty large XML document. There are definite limits
on how large of document that xmlParse() can process. As xmlParse uses
a DOM parsing
On 5/3/2011 9:14 AM, Torrent Girl wrote:
cfset getJobs = 'http://www.microsoft-careers.
com/Microsoft-Diversity-AAWIT116obs.xml'
That looks to be a pretty large XML document. There are definite
limits
on how large of document that xmlParse() can process. As xmlParse
uses
a DOM
you try to parse that flat text into a DOM
relational data structure.
Now IF you do not need to parse the flat data, you can use
xmlTransform(), and maybe xmlSearch(), to apply XPATH to the large flat
text data and create smaller subsets of the XML. That might get you
where you need to go
you try to parse that flat text into a DOM
relational data structure.
Now IF you do not need to parse the flat data, you can use
xmlTransform(), and maybe xmlSearch(), to apply XPATH to the large flat
text data and create smaller subsets of the XML. That might get you
where you need to go
Hi,
Anyone know how to pass file name to the bulkload when sqlserver and coldfision
servers are on different physical servers; The following xml load works when
both SQl and CF servers are residing on the same physical server.
- How I can refer to the local file where sqlserver can access
Here's the update:
Jochem's StAX-based solution worked so well -- and it allowed me to
re-use existing code since I was already processing xml -- that I
didn't bother to consider testing the xml2csv utility.
Original code processing a 45mb file yielded an insert time of 90
seconds per record
Nice report! I'll try and remember that the next time I have to parse huge
XML files. :-)
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive
Nice...
-Original Message-
From: Matt Robertson [mailto:websitema...@gmail.com]
Sent: Saturday, February 19, 2011 9:06 PM
To: cf-talk
Subject: Re: Big XML files processing Really s-l-o-w. Solution?
Here's the update:
Jochem's StAX-based solution worked so well -- and it allowed me
: Matt Robertson [mailto:websitema...@gmail.com]
Sent: Saturday, February 19, 2011 8:06 PM
To: cf-talk
Subject: Re: Big XML files processing Really s-l-o-w. Solution?
Here's the update:
Jochem's StAX-based solution worked so well -- and it allowed me to
re-use existing code since I was already
On Wed, Feb 16, 2011 at 8:08 PM, Rick Faircloth wrote:
Perhaps this will be of some help.
Thanks Rick, Interesting stuff. I don't work with xml so much so a
lot of this is new, and I hate new :-). I haven't been a full-time
programmer for a few years now so I haven't kept up with everything
No problem... I haven't done much with XML, myself, so I thought
this presented a good opportunity to learn something new, too.
Let us know how the solution you're working on pans out.
-Original Message-
From: Matt Robertson [mailto:websitema...@gmail.com]
Sent: Thursday, February 17
In our company I found a solution to parse big XML files in ColdFusion
applications:
1) using xml2csv(http://www.a7soft.com/xml2csv.html), a very fast
application to convert XML to csv file;
2) with SQL Server BULK INSERT to insert in our database
Using this approach reduced time in 100 times
-Original Message-
From: Marco Antonio C. Santos [mailto:marcoacsan...@gmail.com]
Sent: Thursday, February 17, 2011 9:54 AM
To: cf-talk
Subject: Re: Big XML files processing Really s-l-o-w. Solution?
In our company I found a solution to parse big XML files in ColdFusion
applications:
1
Good to know!
-Original Message-
From: Marco Antonio C. Santos [mailto:marcoacsan...@gmail.com]
Sent: Thursday, February 17, 2011 10:54 AM
To: cf-talk
Subject: Re: Big XML files processing Really s-l-o-w. Solution?
In our company I found a solution to parse big XML files
On Thu, Feb 17, 2011 at 8:56 AM, Rick Faircloth wrote:
Good to know!
Indeed. Thanks to Marco and Mark. I plan on trying out both this and
Jochem's solution starting maybe as soon as tomorrow and certainly
through the long U.S. holiday weekend. Maybe try both and see which
is faster. I'll
Hey everybody, we're in a bind here and I pitched the idea to the
client of bringing in a ringer. Is there someone out there who is
interested in building a direct-to-SQL Server or direct-to-mySQL-based
solution?
Solution would have to, on a scheduled basis, grab a file in a
location on the
Hi, Matt...
I know you might have looked at this link at dev.mysql.com
for a solution to processing your data feed, but I thought I'd
bring it up, just in case you haven't seen it. Looks like it
might be right up your alley.
http://dev.mysql.com/tech-resources/articles/xml-in-mysql5.1-6.0
in.
- I can write CF code to pull the price and currency out of the
pricing section, but how would mySQL do something like that
where the xml design was made as complicated as humanly
possible? (this format is StarStandard.org-based, btw)
- Note the ImageAttachmentExtended records. There can
might have looked at this link at dev.mysql.com
for a solution to processing your data feed, but I thought I'd
bring it up, just in case you haven't seen it. Looks like it
might be right up your alley.
http://dev.mysql.com/tech-resources/articles/xml-in-mysql5.1-6.0.html#xml-5.
1-in-and-out
hours for a 45 mb file and thats a disaster.
Would it help if you split the file into individual records before
processing them?
http://jochem.vandieten.net/2011/02/17/splitting-large-xml-files-with-coldfusion-and-stax/
Jochem
--
Jochem van Dieten
http://jochem.vandieten.net
predecessor. But there are no
CR's or LF's in the file so that is out.
Thanks very much for that post and your thoughts.
Incidentally if anyone is looking for an xml reader/editor that can
almost instantly read these kinds of moster files, check out the free
firstobject xml editor.
http
Hi, Matt...
I've been tinkering with parsing the xml file and, though
I haven't developed a full solution, I've made some progress
that I thought I'd share.
I created a MySQL 5 database called, xmlTest.
I created a MySQL 5 database table called, xmlBlob.
Fields:
- rowID (int, not null
#
variable=x
/cflock
cfset x =
replaceNoCase(x,StateOrProvinceCountrySub-DivisionID,StateProvince,ALL)
!---
turn the file into a coldfusion xml object
---
cfset x=ltrim(trim(x))
cfset x=XMLParse(x)
The above takes only a few seconds. No problem there.
Next I have to read in some header info
cfscript
that are in themselves fairly complex. The more records there
are, the longer the loop over them takes. More records + more time
per record = a seemingly geometric increase in processing time.
Are you using MS SQL 2005? Because throwing the XML file directly at SQL
server works a 1000% better. I've basically
records there
are, the longer the loop over them takes. More records + more time
per record = a seemingly geometric increase in processing time.
Are you using MS SQL 2005? Because throwing the XML file directly at SQL
server works a 1000% better. I've basically given up on processing large XML
[dbo].[spBIG_XML_Insert]
@mydoc xml,
AS
declare @hdoc int
-- Create an internal representation of the XML document.
EXEC sp_xml_preparedocument @hdoc OUTPUT, @mydoc, 'soap:Envelope
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema
Client is running mySQL, But a SQL Server could probably be arranged
if we have to. Kind of a painful investment for them, though.
I was kind of hoping you guys would find a bonehead mistake that would
magically clear this up. I'm out of CF-based ideas.
Speaking of which, I tried shortening
On Mon, Feb 14, 2011 at 3:27 PM, Mark Mandel wrote:
Either that, or start looking at something like StaX -
http://stax.codehaus.org/Home
thx for the tip on Stax but it frankly looks a bit out of my league
for this project.
--
--m@Robertson--
Janitor, The Robertson Team
mysecretbase.com
1 - 100 of 3602 matches
Mail list logo