`writedump(xmlSearch(test, "allEnrollments/enrollm...
# cfml-general
m
writedump(xmlSearch(test, "allEnrollments/enrollment").map((enrollment) => enrollment.toString()).toList(""))
gives me output like
Copy code
<?xml version="1.0" encoding="UTF-8"?><enrollment>...</enrollment><?xml version="1.0" encoding="UTF-8"?><enrollment>...</enrollment>
How do I get the same output without the
<?xml version="1.0" encoding="UTF-8"?>
XML declaration for each one? I just want the node itself, not each node as a full xml object.
g
I had a similar-ish question a while ago - and asked @ben for some help. You might find his solution to me helps you out.
y
You can check this out.
m
What does your
xmlSearch()
piece return? What does the array look like before you convert to a list? Is the
<?xml...>
node is its own array element?
m
xmlSearch looks like it's returning an array of individual xml documents, each with their own <?xml...> declaration at the start
thanks @gavinbaumanis and @Yogesh Lucid I will check those out