ProtoObjectObjectSCXMLElementWrapperSCSeasideResponse
| httpResponse |
| instance | class |
|---|---|
| HTTP info initialize parts | instance creation |
| httpResponse |
|---|
|
| HTTP info |
|---|
| cookies |
^httpResponse cookies |
| status |
^httpResponse status |
| initialize |
|---|
| initializeFromResponse: anHttpResponse |
| doc | anHttpResponse contents reset. httpResponse _ anHttpResponse. doc _ XMLDOMParser parseDocumentFrom: anHttpResponse contents. self initializeFromXMLElement: (doc elementAt: #html) |
| parts |
|---|
| anchorWithId: aString |
^self anchorWithId: aString ifNone: [] |
| anchorWithId: aString ifNone: aBlock |
| res | res _ self elementWithId: aString ifNone: []. ^res ifNil: aBlock ifNotNil: [SCSeasideAnchor fromXMLElement: res] |
| anchorWithLabel: aString |
^ self anchors detect: [:anchor | anchor label = aString] ifNone: [] |
| anchorWithLabel: aString ifNone: aBlock |
^ self anchors detect: [:anchor | anchor label = aString] ifNone: aBlock |
| anchors |
| result | result := OrderedCollection new. self allElementsWithTag: #a in: xmlElement addTo: result. result := result select: [:each | each attributes includesKey: #href]. ^result collect: [:each | SCSeasideAnchor fromXMLElement: each] |
| anchorsWithLabel: aString |
^ self anchors select: [:anchor | anchor label = aString] |
| bodyElement |
^ xmlElement elementAt: #body |
| formWithId: aString |
^ self formWithId: aString ifNone: [] |
| formWithId: aString ifNone: aBlock |
| res | res _ self elementWithId: aString ifNone: []. ^ res ifNil: aBlock ifNotNil: [SCSeasideForm fromXMLElement: res] |
| forms |
| result | result := OrderedCollection new. self allElementsWithTag: #form in: xmlElement addTo: result. ^result collect: [:each | SCSeasideForm fromXMLElement: each] |
| fullStringContents |
^httpResponse contents contents |
| stringTaggedWithId: anId |
^(self elementWithId: anId) contents first string |
| instance creation |
|---|
| fromResponse: aResponse |
^ self new initializeFromResponse: aResponse |