Hello everyone, I would like to inform that I took help of our own Super Geek Mr. Charlie Arehart and I have the solution.
Thank you Charlie. Just wanted to share with everyone, so you know where to look, if you ever needed assistance with bug fixing or general ideas about coding ;-). Ajas. On Tue, Aug 26, 2008 at 9:49 AM, Ajas Mohammed <[EMAIL PROTECTED]> wrote: > Hi there, > > I am willing to pay for this mini project but I need a perfect solution. > Its a simple moving of elements part, with only catch that, element have > nameprefix and we have to skip those...Derrick gave a a nice example and I > worked on it and came close. However, time is not on my side and i have > other stuff to take care. So if you think you can get it fixed asap, please > contact me off the list or give me your hourly rate/quote for this work. > > Thanks, > > <!--- we need EncryptedKey after ds:RetrievalMethod, i.e.in the cfm code > lhs of cfset stmt > samlp:Response > saml:Assertion > saml:Attribute > saml:AttributeValue > saml:EncryptedAttribute > xenc:EncryptedData > xenc:EncryptionMethod > ds:KeyInfo > ds:RetrievalMethod---> > > <!---EncryptedKey element is in this order in the actual xml file. i.e. RHS > of cfset statement > samlp:Response > saml:Assertion > saml:Attribute > saml:AttributeValue > saml:EncryptedAttribute---> > > so after EncryptedKey element is moved, it will be deleted from its actual > location and will appear as per snapshot..... > > In the image attached, The left hand side is the correct version and thats > what we need... > > > Thanks, > > > On Tue, Aug 26, 2008 at 3:27 AM, Ajas Mohammed <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> Thanks.. I am almost there...i am getting this error even though i feel I >> am following correct order of elements. I have added comments in code which >> say where I want to move encryptedkey element and where exactly its located >> in actual xml which is causing the error. Code is attached >> >> Element >> RESPONSE.ASSERTION.ATTRIBUTE.ATTRIBUTEVALUE.ENCRYPTEDATTRIBUTE.ENCRYPTEDKEY >> is undefined in MYDOC. The error occurred in >> *C:\Inetpub\wwwroot\CFExamples\MovingXMLElement.cfm: >> line 133* >> >> <!--- we need EncryptedKey after ds:RetrievalMethod, i.e. lhs of cfset >> stmt >> samlp:Response >> saml:Assertion >> saml:Attribute >> saml:AttributeValue >> saml:EncryptedAttribute >> xenc:EncryptedData >> xenc:EncryptionMethod >> ds:KeyInfo >> ds:RetrievalMethod---> >> >> <!---EncryptedKey element is in this order in the actual xml file. i.e. >> RHS of cfset statement >> samlp:Response >> saml:Assertion >> saml:Attribute >> saml:AttributeValue >> saml:EncryptedAttribute---> >> >> Thanks, >> On Mon, Aug 25, 2008 at 9:06 PM, Derrick Peavy < >> [EMAIL PROTECTED]> wrote: >> >>> <cfscript> >>> selectedElements = XmlSearch(XmlParse(trim(cfhttp.fileContent)), >>> "/abc/xyz/"); >>> for (i = 1; i LTE ArrayLen(selectedElements); i = i + 1) >>> IUseAnArrayForThisYouCanUseWhatYouWant[i][2] = >>> selectedElements[i].normal.name.space.XmlText; >>> for (i = 1; i LTE ArrayLen(selectedElements); i = i + 1) >>> IUseAnArrayForThisYouCanUseWhatYouWant[i][3] = >>> selectedElements[i]["saml:name"].XmlText; >>> </cfscript> >>> >>> Note the lack of a period (.) between the two bracketed items >>> .... [i]["saml:name"] whereas in the first instance, there is a period >>> between the elements ...[i].normal.name.space.XmlText; >>> >>> Colons (:) should NOT be in a name space. Yet, I have two feeds that I >>> have to parse with it. Thanks to this list, I found a way around it. But... >>> jack asses will be jack asses. >>> >>> Problem comes down to 1) how you read the specs and 2) if you decide to >>> be Atom compliant, XML compliant, XSL, RSS 1.0, 2.0, yadda yadda. Bunch of >>> krap. People forming XML documents for others to digest should just stop >>> being so difficult and make an easy to parse name. Hell, underscores are OK, >>> so why not use those? >>> >>> That being said, I am sure I will get 10, no 20, no 100 replies on the >>> list telling me how wrong I am. But that doesn't change the fact that an XML >>> author who is considerate of others can avoid these issues. >>> >>> http://www.stylusstudio.com/xmldev/200503/post90310.html# >>> >>> By XML 1.0[1] technically yes, but the second note in section 2.3 after >>> production [3] states: The Namespaces in XML Recommendation [XML Names] >>> assigns a meaning to names containing colon characters. Therefore, authors >>> should not use the colon in XML names except for namespace purposes, but >>> XML processors must accept the colon as a name character. >>> >>> >>> This coming from a person who codes XHTML 1.0 strict. So, take it for >>> what it's worth. >>> >>> _____________ >>> Derrick Peavy >>> 404-786-5036 >>> Sales and Web Services >>> CollegeClassifieds.com >>> http://www.collegeclassifieds.com >>> A Service of Universal Advertising, inc. >>> ___________________________________ >>> >>> >>> On Aug 25, 2008, at 5:07 PM, Douglas Knudsen wrote: >>> >>> sounds like fun with namespaces. You might be able to use a wildcard, >>> depends on your use case there. >>> Here is a example >>> http://www.aftergeek.com/2006/08/xmlsearch-xpath-and-xml-namespaces-in.html >>> >>> DK >>> >>> On Mon, Aug 25, 2008 at 4:51 PM, Ajas Mohammed <[EMAIL PROTECTED]>wrote: >>> >>>> Hi, >>>> >>>> I have a working example of moving elements in an xml. I got it from >>>> web. It works fine for an xml file like this. see code attached. >>>> MovingXMLElement_test[1].cfm (*application/x-cfm*) >>>> 54K<http:///?ui=2&ik=3cc33cc420&view=att&th=11bfb9fc5dab42ec&attid=0.1>works >>>> MovingXMLElement.cfm (*application/x-cfm*) >>>> 7K<http:///?ui=2&ik=3cc33cc420&view=att&th=11bfb9fc5dab42ec&attid=0.2>does >>>> not work and I get this error >>>> >>>> Invalid CFML construct found on line 46 at column 19. >>>> ColdFusion was looking at the following text: >>>> >>>> : >>>> >>>> The CFML compiler was processing: >>>> >>>> * a cfset tag beginning on line 46, column 2. >>>> >>>> The issue is that the xml I am working with has name prefix like this >>>> <samlp:employee> >>>> <saml:name>xyz</saml:name> >>>> </samlp:employee> >>>> >>>> Any suggestions? Please dont mind the indentation of xml file, in the >>>> code which is not working. >>>> >>>> >>>> -- >>>> <Ajas Mohammed /> >>>> http://ajashadi.blogspot.com >>>> We cannot become what we need to be, remaining what we are. >>>> No matter what, find a way. Because thats what winners do. >>>> You can't improve what you don't measure. >>>> Quality is never an accident; it is always the result of high intention, >>>> sincere effort, intelligent direction and skillful execution; it represents >>>> the wise choice of many alternatives. >>>> >>>> ------------------------------------------------------------- >>>> To unsubscribe from this list, manage your profile @ >>>> http://www.acfug.org?fa=login.edituserform<http://www.acfug.org/?fa=login.edituserform> >>>> >>>> For more info, see http://www.acfug.org/mailinglists >>>> Archive @ http://www.mail-archive.com/discussion%40acfug.org/ >>>> List hosted by FusionLink <http://www.fusionlink.com/> >>>> ------------------------------------------------------------- >>> >>> >>> >>> >>> -- >>> Douglas Knudsen >>> http://www.cubicleman.com >>> this is my signature, like it? >>> >>> ------------------------------------------------------------- >>> To unsubscribe from this list, manage your profile @ >>> http://www.acfug.org?fa=login.edituserform<http://www.acfug.org/?fa=login.edituserform> >>> >>> For more info, see http://www.acfug.org/mailinglists >>> Archive @ http://www.mail-archive.com/discussion%40acfug.org/ >>> List hosted by FusionLink <http://www.fusionlink.com/> >>> ------------------------------------------------------------- >>> >>> >>> >> >> >> -- >> <Ajas Mohammed /> >> http://ajashadi.blogspot.com >> We cannot become what we need to be, remaining what we are. >> No matter what, find a way. Because thats what winners do. >> You can't improve what you don't measure. >> Quality is never an accident; it is always the result of high intention, >> sincere effort, intelligent direction and skillful execution; it represents >> the wise choice of many alternatives. >> > > > > -- > <Ajas Mohammed /> > http://ajashadi.blogspot.com > We cannot become what we need to be, remaining what we are. > No matter what, find a way. Because thats what winners do. > You can't improve what you don't measure. > Quality is never an accident; it is always the result of high intention, > sincere effort, intelligent direction and skillful execution; it represents > the wise choice of many alternatives. > -- <Ajas Mohammed /> http://ajashadi.blogspot.com We cannot become what we need to be, remaining what we are. No matter what, find a way. Because thats what winners do. You can't improve what you don't measure. Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives. ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -------------------------------------------------------------
