Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
steeban #1
xml and xmlsearch
Hi all,
I am new to coldfusion, and i am facing lots of problem....
can anyone solve my problem
I am reading an xml file through cfm and using xmlsearch to filter the xml and
make some changes
but not working
this is the xml file
- <home>
<menu type="Macromedia" u="macromedia.com" />
<menu type="Supports" u="support.com" />
---------------
---------------
</home>
And below is the cfm file code
<cffile action="read" file="C:\Inetpub\wwwroot\cold\main.xml"
variable="myxml">
<cfscript>
myxmldoc = XmlParse(myxml);
selectedElements = XmlSearch(myxmldoc, "/home/menu/@type");
for (i = 1; i LTE ArrayLen(selectedElements); i = i + 1){
writeoutput(selectedElements.XmlText & "<br>" &
selectedElements.XmlAttributes & "<br>");
}
</cfscript>
<cfdump var="#myxmldoc#">
<cfdump var="#selectedElements#">
And I get only errors, Can anyone solve this problem!!!!
please!!!!!!!
steeban Guest
-
XMLParse and XMLSearch
I have the following code: a variable "x" that contains an XML string; if I do an XMLParse on this variable, it works (cfdump shows me the xml... -
xmlsearch and xpath
Hallo all, i have a small problem in xmlsearch and i am new to coldfusion.... The below is the xupdate packet from flash send to coldfusion... -
how to access the array returned from xmlsearch
I am having an xmlsearch function, from which i am getting the attributes of the nodes, which satisfy Only one element is returned that is ... -
XMLSearch. doesnt work
hi i'm trying to use xmlsearch function but for some strange reasons it returns only an empty array here the xml file <?xml version="1.0"...



Reply With Quote

