Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • PHP
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cAjaxRequest
  • cAutoload
  • cBackend
  • cEffectiveSetting
  • cGuiScrollListAlltranslations
  • cHTMLValidator
  • cMailer
  • cModuleFileTranslation
  • cModuleHandler
  • cModuleSearch
  • cModuleSynchronizer
  • cModuleTemplateHandler
  • CodeMirror
  • cPasswordRequest
  • cPermission
  • cRegistry
  • cSystemPurge
  • cSystemtest
  • cTinymce4Configuration
  • cTinyMCE4Editor
  • cTinyMCEEditor
  • cWYSIWYGEditor
  • FrontendList
  • HtmlParser
  • TODOBackendList
  • TreeItem
  • UploadList
  • UploadSearchResultList

Functions

  • addArtspec
  • addSortImages
  • backToMainArea
  • buildArticleSelect
  • buildCategorySelect
  • buildCategorySelectRights
  • buildHeapTable
  • buildStackString
  • buildTree
  • buildUserOrGroupPermsFromRequest
  • callPluginStore
  • cApiCatGetLevelNode
  • cApiImageCheckCachedImageValidity
  • cApiImageCheckImageEditingPosibility
  • cApiImageCheckImageEditingPossibility
  • cApiImageGetCacheFileName
  • cApiImageGetTargetDimensions
  • cApiImageIsAnimGif
  • cApiImgScale
  • cApiImgScaleGetMD5CacheFile
  • cApiImgScaleHQ
  • cApiImgScaleImageMagick
  • cApiImgScaleLQ
  • cApiIsImageMagickAvailable
  • cApiStrCleanURLCharacters
  • cApiStrNormalizeLineEndings
  • cApiStrRecodeString
  • cApiStrReplaceDiacritics
  • cApiStrTrimAfterWord
  • cApiStrTrimHard
  • cApiStrTrimSentence
  • cDeprecated
  • cDie
  • cError
  • checkLangInClients
  • checkPathInformation
  • cInclude
  • compareUrlStrings
  • conChangeTemplateForCat
  • conCopyArticle
  • conCopyArtLang
  • conCopyContainerConf
  • conCopyContent
  • conCopyMetaTags
  • conCopyTemplateConfiguration
  • conCreateLocationString
  • conDeeperCategoriesArray
  • conDeleteart
  • conEditArt
  • conEditFirstTime
  • conFetchCategoryTree
  • conFlagOnOffline
  • conGenerateCode
  • conGenerateCodeForAllArts
  • conGenerateCodeForAllArtsInCategory
  • conGenerateCodeForAllartsUsingLayout
  • conGenerateCodeForAllartsUsingMod
  • conGenerateCodeForAllArtsUsingTemplate
  • conGenerateCodeForArtInAllCategories
  • conGenerateCodeForClient
  • conGenerateKeywords
  • conGetAvailableMetaTagTypes
  • conGetCategoryArticleId
  • conGetCategoryAssignments
  • conGetContainerConfiguration
  • conGetContentFromArticle
  • conGetHtmlTranslationTable
  • conGetMetaValue
  • conGetTemplateConfigurationIdForArticle
  • conGetTemplateConfigurationIdForCategory
  • conGetTopmostCat
  • conGetUniqueArticleUrlname
  • conGetUsedModules
  • conHtmlentities
  • conHtmlEntityDecode
  • conHtmlSpecialChars
  • conIsArticleUrlnameUnique
  • conIsLocked
  • conLock
  • conLockBulkEditing
  • conMakeArticleIndex
  • conMakeCatOnline
  • conMakeInlineScript
  • conMakeOnline
  • conMakeOnlineBulkEditing
  • conMakePublic
  • conMakeStart
  • conMoveArticles
  • conPhp54Check
  • conRemoveOldCategoryArticle
  • conSaveContentEntry
  • conSetCodeFlag
  • conSetCodeFlagBulkEditing
  • conSetMetaValue
  • conSetStartArticle
  • consoleLog
  • conSyncArticle
  • copyRightsForElement
  • createBulkEditingFunction
  • createRandomName
  • createRightsForElement
  • cWarning
  • dbGetColumns
  • dbGetIndexes
  • dbGetPrimaryKeyName
  • dbTableExists
  • dbUpgradeTable
  • defineIfNotDefined
  • deleteArtspec
  • deleteRightsForElement
  • deleteSystemProperty
  • displayDatetime
  • emptyLogFile
  • endAndLogTiming
  • extractNumber
  • generateDisplayFilePath
  • generateJs
  • getAllClientsAndLanguages
  • getArtLang
  • getArtspec
  • getAvailableContentTypes
  • getCanonicalDay
  • getCanonicalMonth
  • getDirectorySize
  • getEffectiveSetting
  • getEffectiveSettingsByType
  • getEncodingByLanguage
  • getFileInformation
  • getFileType
  • getGroupOrUserName
  • getIDForArea
  • getJsHelpContext
  • getLanguageNamesByClient
  • getLanguagesByClient
  • getmicrotime
  • getNamedFrame
  • getParentAreaId
  • getRightsList
  • getSearchResults
  • getStrExpandCollapseButton
  • getSystemProperties
  • getSystemPropertiesByType
  • getSystemProperty
  • getTemplateSelect
  • getUplExpandCollapseButton
  • htmldecode
  • htmlentities_iso88592
  • humanReadableSize
  • includePlugins
  • insertEmptyStrRow
  • ipMatch
  • isAlphanumeric
  • isArchive
  • isArtInMultipleUse
  • isFunctionDisabled
  • isGroup
  • isIPv4
  • isRunningFromWeb
  • isStartArticle
  • isUtf8
  • isValidMail
  • langActivateDeactivateLanguage
  • langDeleteLanguage
  • langEditLanguage
  • langGetTextDirection
  • langNewLanguage
  • langRenameLanguage
  • layDeleteLayout
  • layEditLayout
  • machineReadableSize
  • mailLogBulkEditingFunctions
  • mailLogDecodeAddresses
  • markSubMenuItem
  • mask
  • modDeleteModule
  • modEditModule
  • phpInfoToHtml
  • plugin_include
  • prCreateURLNameLocationString
  • prDeleteCacheFileContent
  • prGetCacheFileContent
  • prResolvePathViaCategoryNames
  • prResolvePathViaURLNames
  • prWriteCacheFileContent
  • recursiveCopy
  • removeFileInformation
  • renderBackendBreadcrumb
  • renderLabel
  • renderSelectProperty
  • renderTextProperty
  • saveGroupRights
  • saveRights
  • scanDirectory
  • scanPlugins
  • sendEncodingHeader
  • set_magic_quotes_gpc
  • setArtspecDefault
  • setArtspecOnline
  • setSystemProperty
  • showTree
  • startTiming
  • statCreateLocationString
  • statDisplayTopChooser
  • statDisplayYearlyTopChooser
  • statGetAvailableMonths
  • statGetAvailableYears
  • statResetStatistic
  • statsArchive
  • statsDisplayInfo
  • statsOverviewAll
  • statsOverviewTop
  • statsOverviewTopYear
  • statsOverviewYear
  • strAssignTemplate
  • strBuildSqlValues
  • strCheckAlias
  • strCheckTreeForErrors
  • strCopyCategory
  • strCopyTree
  • strDeeperCategoriesArray
  • strDeleteCategory
  • strHasArticles
  • strHasStartArticle
  • strMakePublic
  • strMakeVisible
  • strMoveCatTargetallowed
  • strMoveDownCategory
  • strMoveSubtree
  • strMoveUpCategory
  • strNewCategory
  • strNewTree
  • strNextBackwards
  • strNextDeeper
  • strNextDeeperAll
  • strNextPost
  • strOrderedPostTreeList
  • strRemakeTreeTable
  • strRenameCategory
  • strRenameCategoryAlias
  • strSortPrePost
  • strSyncCategory
  • systemHavePerm
  • tplAutoFillModules
  • tplBrowseLayoutForContainers
  • tplcfgDuplicate
  • tplDeleteTemplate
  • tplDuplicateTemplate
  • tplEditTemplate
  • tplGetContainerDefault
  • tplGetContainerMode
  • tplGetContainerName
  • tplGetContainerNumbersInLayout
  • tplGetContainerTypes
  • tplGetInUsedData
  • tplIsTemplateInUse
  • tplPreparseLayout
  • tplProcessSendContainerConfiguration
  • updateClientCache
  • updateFileInformation
  • uplCreateFriendlyName
  • uplDirectoryListRecursive
  • uplGetDirectoriesToExclude
  • uplGetFileExtension
  • uplGetFileIcon
  • uplGetFileTypeDescription
  • uplGetThumbnail
  • uplHasFiles
  • uplHasSubdirs
  • uplmkdir
  • uplRecursiveDBDirectoryList
  • uplRecursiveDirectoryList
  • uplRenameDirectory
  • uplSearch
  • uplSyncDirectory
  • uplSyncDirectoryDBFS
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class HtmlParser

Class HtmlParser.

To use, create an instance of the class passing HTML text.

Then invoke parse() until it's false.

When parse() returns true, $_NodeType, $_NodeName $_NodeValue and $_NodeAttributes are updated.

Copyright (c) 2003 Starnetsys, LLC. All rights reserved. Redistribution of source must retain this copyright notice.

Starnetsys, LLC (http://starnetsys.com) specializes in website design and software consulting

Package: Core\Backend
Copyright: Starnetsys, LLC.
Author: Starnetsys, LLC.
Located at classes/class.htmlparser.php
Methods summary
public
# __construct( string $HtmlText )

Constructor to create an instance of this class.

Constructor to create an instance of this class.

Constructs an HtmlParser instance with the HTML text given.

Parameters

$HtmlText
string
$HtmlText
public HtmlParser::__construct()
# HtmlParser( string $HtmlText )

Old constructor.

Old constructor.

Deprecated

[2016-02-04] This method is deprecated and is not needed any longer. Please use __construct() as constructor function.

Parameters

$HtmlText
string
$HtmlText

Returns

HtmlParser::__construct()
public string
# setHtmlText( string $htmlText )

Set method for HtmlText variable.

Set method for HtmlText variable.

Parameters

$htmlText
string
$htmlText

Returns

string
public integer
# setHtmlTextLength( integer $htmlTextLength )

Set method for HtmlTextLength variable.

Set method for HtmlTextLength variable.

Parameters

$htmlTextLength
integer
$htmlTextLength

Returns

integer
public integer
# setHtmlTextIndex( integer $HtmlTextIndex )

Set method for HtmlTextIndex variable.

Set method for HtmlTextIndex variable.

Parameters

$HtmlTextIndex
integer
$HtmlTextIndex

Returns

integer
public boolean|array
# _setNodeAttributes( array $NodeAttributes )

Set method for NodeAttributes.

Set method for NodeAttributes.

To clear this array please use _clearAttributes function.

Parameters

$NodeAttributes
array
$NodeAttributes

Returns

boolean|array
public string
# getHtmlText( )

Get method for _HtmlText.

Get method for _HtmlText.

Returns

string
public integer
# getHtmlTextLength( )

Get method for _HtmlTextLength.

Get method for _HtmlTextLength.

Returns

integer
public string
# getNodeType( )

Get method for _NodeType.

Get method for _NodeType.

Returns

string
public string
# getNodeName( )

Get method for _NodeName.

Get method for _NodeName.

Returns

string
public array
# getNodeAttributesArray( )

Getmethod for _NodeAttributes.

Getmethod for _NodeAttributes.

Returns

array
public string
# getNodeAttributes( string $attribute )

Get method for _NodeAttributes with specific attribute.

Get method for _NodeAttributes with specific attribute.

Parameters

$attribute
string
$attribute

Returns

string
public integer
# getHtmlTextIndex( )

Get method for _HtmlTextIndex.

Get method for _HtmlTextIndex.

Returns

integer
protected boolean
# increaseHtmlTextIndex( )

Increase HtmlTextIndex.

Increase HtmlTextIndex.

Returns

boolean
public boolean
# parse( )

Method parse.

Method parse.

Parses the next node. Returns false only if the end of the HTML text has been reached. Updates values of iNode* fields.

Returns

boolean
protected array
# _clearAttributes( )

Clear (reset) _NodeAttributes array.

Clear (reset) _NodeAttributes array.

Returns

array
protected boolean
# _readTag( )

Returns

boolean
protected number
# _isValidTagIdentifier( string $name )

Parameters

$name
string
$name

Returns

number
protected boolean
# _skipBlanksInTag( )

Returns

boolean
protected string
# _skipToBlanksOrEqualsInTag( )

Returns

string
protected string
# _skipToBlanksInTag( )

Returns

string
protected string
# _skipEqualsInTag( )

Returns

string
protected string
# _readValueInTag( )

Returns

string
protected number|string
# _currentChar( )

Returns

number|string
protected boolean
# _moveNext( )

Returns

boolean
protected string
# _skipEndOfTag( )

Returns

string
protected string
# _skipInTag( string $chars )

Parameters

$chars
string
$chars

Returns

string
protected string
# _skipToInTag( string $chars )

Parameters

$chars
string
$chars

Returns

string
protected string
# _skipToElement( )

Returns

string
protected string
# _skipToStringInTag( string $needle )

Returns text between current position and $needle, inclusive, or "" if not found.

Returns text between current position and $needle, inclusive, or "" if not found.

The current index is moved to a point after the location of $needle, or not moved at all if nothing is found.

Parameters

$needle
string
$needle

Returns

string
Constants summary
integer NODE_TYPE_ELEMENT 1
#

Node type ID for elements.

Node type ID for elements.

integer NODE_TYPE_ENDELEMENT 2
#

Node type ID for endelements.

Node type ID for endelements.

integer NODE_TYPE_TEXT 3
#

Node type ID for texts.

Node type ID for texts.

integer NODE_TYPE_COMMENT 4
#

Node type ID for comments.

Node type ID for comments.

integer NODE_TYPE_DONE 5
#

Node type ID when done.

Node type ID when done.

Properties summary
protected integer $_NodeType
#

Field iNodeType.

Field iNodeType.

May be one of the NODE_TYPE_* constants above.

protected string $_NodeName ""
#

Field iNodeName.

Field iNodeName.

For elements, it's the name of the element.

protected string $_NodeValue ""
#

Field iNodeValue.

Field iNodeValue.

For text nodes, it's the text.

protected array $_NodeAttributes array()
#

Field iNodeAttributes.

Field iNodeAttributes.

A string-indexed array containing attribute values of the current node. Indexes are always lowercase.

protected string $_HtmlText ''
#
protected integer $_HtmlTextLength
#
protected integer $_HtmlTextIndex 0
#
CMS CONTENIDO 4.10.0 API documentation generated by ApiGen 2.8.0