Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
JimmyDaFist #1
XML PARSE Problem (No End Tag)
I am trying to parse this XML document below and access the attributes in the
Child (Fields). The problem is that I cannot get past the XMLChild of ENVELOPE
because it has no end Tag. I know the that /> means it is the end tag but how
does CF know this. Does anyone have an idea on how to access the Child
(Fields)? The XML and my code are below: <!------ XML <?xml version='1.0'
encoding='UTF-8'?> <ARCXML version='1.1'> <RESPONSE> <FEATURES> <FEATURE>
<ENVELOPE minx='253456' miny='224100' maxx='253456' maxy='224100'/> <FIELDS
SDE.DBO.SDE_VOIS_EVENT.CATEGORY_TYPE='Other' SHAPE.fid='9878'
SDE.DBO.SDE_VOIS_EVENT.NAME='Northumberland Co./Rt. 617/Road Closure/9-01-2004'
SDE.DBO.SDE_VOIS_EVENT.NOTES='2-14-05 Route 617 in Northumberland County at
Gardy&apos;s Mill pond remains closed pending repairs to the spillway
structure and earthern dam.' SDE.DBO.SDE_VOIS_EVENT.STATUS='Open'
SDE.DBO.SDE_VOIS_EVENT.REPORTDATE='1108389720000'
SDE.DBO.SDE_VOIS_EVENT.CATEGORY='Other' SDE.DBO.SDE_VOIS_EVENT.EVENT_ID='43763'
SDE.DBO.SDE_VOIS_EVENT.X='253456' SDE.DBO.SDE_VOIS_EVENT.Y='224100'
SHAPE='[Geometry]' /> </FEATURE> FEATURES></RESPONSE></ARCXML>
JimmyDaFist Guest
-
Problem to get Parse::Yapp and Parse:Flex working together
A) I did: # cd ~/.cpan/build/Parse-Flex-0.03 # more src/default.y %{ #define YY_DECL char* yyylex YY_PROTO(( void )) #undef yywrap int... -
Problem to install Parse::Lex, all tests fails
Hello, I have a problem to install Parse::Lex with Perl 5.8.3. I tried on other systems (Cygwin, Fedora 2) as well, and run into the same issue:... -
How to parse a date? (strptime problem)
Hi gurus and nubys, I was wondering how to parse a line like this: 01/Oct/1980:01:56:57 I know I can use strftime() to write it: => true =>... -
Parse problem.
I have a problem that php removes the + char. When i type this in the adres bar: http://www.test.com/test.php?t=a+b and when i do a echo in the... -
[TABLE NOT SHOWN] problem with HTML::Parse
When I run the well quoted line: my $ascii = HTML::FormatText->new->format(HTML::Parse::parse_html($html)); to remove HTML tags from an html... -
JimmyDaFist #2
XML PARSE Problem (No End Tag)
I am trying to parse this XML document below and access the attributes in the
Child (Fields). The problem is that I cannot get past the XMLChild of ENVELOPE
because it has no end Tag. I know the that /> means it is the end tag but how
does CF know this. Does anyone have an idea on how to access the Child
(Fields)? The XML and my code are below: <!------ XML ------> <?xml
version='1.0' encoding='UTF-8'?> <ARCXML version='1.1'> <RESPONSE> <FEATURES>
<FEATURE> <ENVELOPE minx='253456' miny='224100' maxx='253456' maxy='224100'/>
<FIELDS SDE.DBO.SDE_VOIS_EVENT.CATEGORY_TYPE='Other' SHAPE.fid='9878'
SDE.DBO.SDE_VOIS_EVENT.NAME='Northumberland Co./Rt. 617/Road Closure/9-01-2004'
SDE.DBO.SDE_VOIS_EVENT.NOTES='2-14-05 Route 617 in Northumberland County at
Gardy&apos;s Mill pond remains closed pending repairs to the spillway
structure and earthern dam.' SDE.DBO.SDE_VOIS_EVENT.STATUS='Open'
SDE.DBO.SDE_VOIS_EVENT.REPORTDATE='1108389720000'
SDE.DBO.SDE_VOIS_EVENT.CATEGORY='Other' SDE.DBO.SDE_VOIS_EVENT.EVENT_ID='43763'
SDE.DBO.SDE_VOIS_EVENT.X='253456' SDE.DBO.SDE_VOIS_EVENT.Y='224100'
SHAPE='[Geometry]' /> </FEATURE> FEATURES></RESPONSE></ARCXML> <!--------
My current CODE that can't get by the ENVELOPE Child, this will just get the
child ENVELOPE --------> <CFSET mydoc = XmlParse(xmldoc)> <CFOUTPUT>
<CFSET Root =
#mydoc.XMLRoot.XMLChildren[1].XMLChildren[1].XMLChildren[1].XMLChildren[1].XMLNa
me#> #Root# </CFOUTPUT> :confused;
JimmyDaFist Guest
-
Rupesh Kumar #3
Re: XML PARSE Problem (No End Tag)
could you please verify if your xml is fine. a simple way could be to open
it in IE or any IDE.
As of now, i can see that "FEATURES" tag is not closed. I dunno if thats a
real error or thats a typo :-)
rupesh
"JimmyDaFist" <webforumsuser@macromedia.com> wrote in message
news:d1mslg$khp$1@forums.macromedia.com...>I am trying to parse this XML document below and access the attributes in
>the
> Child (Fields). The problem is that I cannot get past the XMLChild of
> ENVELOPE
> because it has no end Tag. I know the that /> means it is the end tag but
> how
> does CF know this. Does anyone have an idea on how to access the Child
> (Fields)? The XML and my code are below: <!------ XML ------> <?xml
> version='1.0' encoding='UTF-8'?> <ARCXML version='1.1'> <RESPONSE>
> <FEATURES>
> <FEATURE> <ENVELOPE minx='253456' miny='224100' maxx='253456'
> maxy='224100'/>
> <FIELDS SDE.DBO.SDE_VOIS_EVENT.CATEGORY_TYPE='Other' SHAPE.fid='9878'
> SDE.DBO.SDE_VOIS_EVENT.NAME='Northumberland Co./Rt. 617/Road
> Closure/9-01-2004'
> SDE.DBO.SDE_VOIS_EVENT.NOTES='2-14-05 Route 617 in Northumberland County
> at
> Gardy&apos;s Mill pond remains closed pending repairs to the spillway
> structure and earthern dam.' SDE.DBO.SDE_VOIS_EVENT.STATUS='Open'
> SDE.DBO.SDE_VOIS_EVENT.REPORTDATE='1108389720000'
> SDE.DBO.SDE_VOIS_EVENT.CATEGORY='Other'
> SDE.DBO.SDE_VOIS_EVENT.EVENT_ID='43763'
> SDE.DBO.SDE_VOIS_EVENT.X='253456' SDE.DBO.SDE_VOIS_EVENT.Y='224100'
> SHAPE='[Geometry]' /> </FEATURE> FEATURES></RESPONSE></ARCXML>
> <!--------
> My current CODE that can't get by the ENVELOPE Child, this will just get
> the
> child ENVELOPE --------> <CFSET mydoc = XmlParse(xmldoc)> <CFOUTPUT>
> <CFSET Root =
> #mydoc.XMLRoot.XMLChildren[1].XMLChildren[1].XMLChildren[1].XMLChildren[1].XMLNa
> me#> #Root# </CFOUTPUT> :confused;
>
Rupesh Kumar Guest



Reply With Quote

