Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting XML Request 1

Status
Not open for further replies.

tmcneil

Technical User
Nov 17, 2000
294
US
I've got some vbscript code that I am trying to format into the proper XML format.

Code:
Dim sAXL
sAXL = ""
sAXL = sAXL & "<?xml version='1.0' ?><ARCXML version='1.1'>"
sAXL = sAXL & "<REQUEST>"
sAXL = sAXL & "  <GET_FEATURES outputmode='newxml' skipfeatures='true' geometry='false'>"
sAXL = sAXL & "    <LAYER id='12' />"
sAXL = sAXL & "    <SPATIALQUERY subfields=#ALL# where=CENSUS.C00_ZIP_CODES.ZCTA5="
sAXL = sAXL &        "'" & zipcode & "'" & " />"
sAXL = sAXL & "    </SPATIALQUERY>"
sAXL = sAXL & "  </GET_FEATURES>"
sAXL = sAXL & "</REQUEST>"
sAXL = sAXL & "</ARCXML>"

I need to have double quotes (") around the #ALL# value and the clause in the where statement, but I forget how to do it at the moment and have been working on this for two days and getting nowhere. Any ideas on how to fix my syntax so I can move on and test?

Thanks, Todd
 
A starting point:
sAXL = sAXL & " <SPATIALQUERY subfields=""#ALL#"" where=""CENSUS.C00_ZIP_CODES.ZCTA5="

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV,

You really jogged my memory about how to use the double quotes correctly. This is what I came up with and I think it's working but I having to continue to test my responses back from the server and count the number of features selected.

Code:
Dim sAXL
sAXL = ""
sAXL = sAXL & "<?xml version='1.0' ?><ARCXML version='1.1'>"
sAXL = sAXL & "<REQUEST>"
sAXL = sAXL & "  <GET_FEATURES outputmode='newxml' skipfeatures='true' geometry='false'>"
sAXL = sAXL & "    <LAYER id='12' />"
sAXL = sAXL & "    <SPATIALQUERY subfields=""#ALL#"" where=""CENSUS.C00_ZIP_CODES.ZCTA5="
sAXL = sAXL &        "'" & zipcode & "'" & """" & " >"
sAXL = sAXL & "    </SPATIALQUERY>"
sAXL = sAXL & "  </GET_FEATURES>"
sAXL = sAXL & "</REQUEST>"
sAXL = sAXL & "</ARCXML>"

I appreciate the tip.
Thanks,
Todd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top