XML PARSE Problem (No End Tag)

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default 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&amp;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

  2. Similar Questions and Discussions

    1. 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...
    2. 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:...
    3. 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 =>...
    4. 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...
    5. [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...
  3. #2

    Default 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&amp;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

  4. #3

    Default 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&amp;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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139