0
xml output

/t5/coldfusion-discussions/xml-output/td-p/880703
Jun 20, 2008
Jun 20, 2008
Copy link to clipboard
Copied
I am trying to put hx:name and i am getting error message any
idea? I think when I use : (colan) that consider as expression
<addresses>
<address>
<hx:name>Richard Mutt</hx:name>
<addrLine1>30 Main St.</addrLine1>
<addrLine2>New Haven, CT 06460</addrLine2>
</address>
</addresses>
<cfoutput>#resultsXML.address.hx:name.inner_text#</cfoutput>
Any help would be appreciated. Thanks
<addresses>
<address>
<hx:name>Richard Mutt</hx:name>
<addrLine1>30 Main St.</addrLine1>
<addrLine2>New Haven, CT 06460</addrLine2>
</address>
</addresses>
<cfoutput>#resultsXML.address.hx:name.inner_text#</cfoutput>
Any help would be appreciated. Thanks
TOPICS
Advanced techniques
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/coldfusion-discussions/xml-output/m-p/880704#M81100
Jun 21, 2008
Jun 21, 2008
Copy link to clipboard
Copied
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Guest
AUTHOR
/t5/coldfusion-discussions/xml-output/m-p/880705#M81101
Jun 23, 2008
Jun 23, 2008
Copy link to clipboard
Copied
Thanks. You mean declare in xml file right or when you out
put this?? I am not sure where to declare.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/coldfusion-discussions/xml-output/m-p/880706#M81102
Jun 23, 2008
Jun 23, 2008
Copy link to clipboard
Copied
<cfxml variable="resultsXML">
<addresses>
<address>
<hx:name xmlns:hx=' http://www.google.com'>Richard Mutt</hx:name>
<addrLine1>30 Main St.</addrLine1>
<addrLine2>New Haven, CT 06460</addrLine2>
</address>
</addresses>
</cfxml>
<cfoutput>#resultsXML.addresses.address["hx:name"].xmltext#</cfoutput>
Three things:
1) Use namespace
(Here I use google arbitrarily)
2) Use associative array notation to avoid problems with the colon
3) I have corrected the output variable
<addresses>
<address>
<hx:name xmlns:hx=' http://www.google.com'>Richard Mutt</hx:name>
<addrLine1>30 Main St.</addrLine1>
<addrLine2>New Haven, CT 06460</addrLine2>
</address>
</addresses>
</cfxml>
<cfoutput>#resultsXML.addresses.address["hx:name"].xmltext#</cfoutput>
Three things:
1) Use namespace
(Here I use google arbitrarily)
2) Use associative array notation to avoid problems with the colon
3) I have corrected the output variable
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Guest
AUTHOR
/t5/coldfusion-discussions/xml-output/m-p/880707#M81103
Jun 24, 2008
Jun 24, 2008
Copy link to clipboard
Copied
Thanks. I have similar question
<StandardReports xmlns=" http://ns.aaa.org/report/s1/" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns:lom=" http://labc.org/xsd/doc" xmlns:m=" http://ns.abq.org/student/k1/" xmlns:n=" http://ns.cq.org/name/k1/" xmlns:hx=" http://ns.medbiq.org/extend/k1/" xsi:schemaLocation=" http://ns.qqq.org/report/s1/at.xsd">
How do I validate this xsd files.
I did this
<cfset myResults=XMLValidate("example.xml"," http://ns.qqq.org/report/s1/at.xsd")>
I am getting following error
struct
errors
array
1 [Error] :2:412: cvc-elt.1: Cannot find the declaration of element 'StandardReports'.
fatalerrors
array [empty]
status NO
warnings
array
1 [Warning] :2:412: SchemaLocation: schemaLocation value = ' http://ns.qqq.org/report/s1/at.xsd' must have even number of URI's.
<StandardReports xmlns=" http://ns.aaa.org/report/s1/" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns:lom=" http://labc.org/xsd/doc" xmlns:m=" http://ns.abq.org/student/k1/" xmlns:n=" http://ns.cq.org/name/k1/" xmlns:hx=" http://ns.medbiq.org/extend/k1/" xsi:schemaLocation=" http://ns.qqq.org/report/s1/at.xsd">
How do I validate this xsd files.
I did this
<cfset myResults=XMLValidate("example.xml"," http://ns.qqq.org/report/s1/at.xsd")>
I am getting following error
struct
errors
array
1 [Error] :2:412: cvc-elt.1: Cannot find the declaration of element 'StandardReports'.
fatalerrors
array [empty]
status NO
warnings
array
1 [Warning] :2:412: SchemaLocation: schemaLocation value = ' http://ns.qqq.org/report/s1/at.xsd' must have even number of URI's.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
LATEST
/t5/coldfusion-discussions/xml-output/m-p/880708#M81104
Jun 24, 2008
Jun 24, 2008
Copy link to clipboard
Copied
There is no XSD file at
http://ns.qqq.org/report/s1/at.xsd
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

