프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$channel | array | All the attributes of the channel description. | |
$charset | string | Feed charset. | |
$child | string | The current child tag - TITLE, DESCRIPTION, URL, etc. | |
$error | string | Error string. | |
$format | string | What kind of feed are we parsing? | |
$image | array | All the attributes of the channel image. | |
$item | array | All the attributes of the current item being parsed. | |
$parent | string | The current parent tag - CHANNEL, STORY, etc. | |
$parser | resource | XML parser resource. | |
$story | array | All the attributes of the current story being parsed. | |
$structure | array | The array that all the parsed information gets dumped into. |
메소드 | 설명 | |
---|---|---|
Jonah_FeedParser ( $charset ) | Constructs a new Jonah_FeedParser parser object. | |
characterData ( $parser, $data ) | The handler for character data encountered in the XML file. | |
cleanup ( ) | Clean up any existing data - reset to a state where we can cleanly open a new file. | |
defaultHandler ( $parser, $data ) | Handles things that we don't recognize. A no-op. | |
endElement ( $parser, $name ) | Handle the ends of XML elements - wrap up whatever we've been putting together and store it for safekeeping. | |
init ( ) | Initialize the XML parser. | |
parse ( $data ) | Actually do the parsing. Separated from the constructor just in case you want to set any other options on the parser, load initial data, whatever. | |
startElement ( $parser, $name, $attribs ) | Start collecting data about a new element. |
public Jonah_FeedParser ( $charset ) |
public characterData ( $parser, $data ) |
public cleanup ( ) |
public defaultHandler ( $parser, $data ) |
public endElement ( $parser, $name ) |
public parse ( $data ) | ||
$data | The XML feed data to parse. |
public startElement ( $parser, $name, $attribs ) |
public string $child | ||
리턴 | string |
public array $story | ||
리턴 | array |
public array $structure | ||
리턴 | array |