Chromium Embedded Framework (CEF)  109.0.1+gcd5e37a+chromium-109.0.5414.8
CefXmlReader Class Referenceabstract

Class that supports the reading of XML data via the libxml streaming API. More...

#include "include/cef_xml_reader.h"

Inheritance diagram for CefXmlReader:
CefBaseRefCounted

Public Types

typedef cef_xml_encoding_type_t EncodingType
 
typedef cef_xml_node_type_t NodeType
 

Public Member Functions

virtual bool MoveToNextNode ()=0
 Moves the cursor to the next node in the document. More...
 
virtual bool Close ()=0
 Close the document. More...
 
virtual bool HasError ()=0
 Returns true if an error has been reported by the XML parser. More...
 
virtual CefString GetError ()=0
 Returns the error string. More...
 
virtual NodeType GetType ()=0
 The below methods retrieve data for the node at the current cursor position. More...
 
virtual int GetDepth ()=0
 Returns the node depth. More...
 
virtual CefString GetLocalName ()=0
 Returns the local name. More...
 
virtual CefString GetPrefix ()=0
 Returns the namespace prefix. More...
 
virtual CefString GetQualifiedName ()=0
 Returns the qualified name, equal to (Prefix:)LocalName. More...
 
virtual CefString GetNamespaceURI ()=0
 Returns the URI defining the namespace associated with the node. More...
 
virtual CefString GetBaseURI ()=0
 Returns the base URI of the node. More...
 
virtual CefString GetXmlLang ()=0
 Returns the xml:lang scope within which the node resides. More...
 
virtual bool IsEmptyElement ()=0
 Returns true if the node represents an empty element. More...
 
virtual bool HasValue ()=0
 Returns true if the node has a text value. More...
 
virtual CefString GetValue ()=0
 Returns the text value. More...
 
virtual bool HasAttributes ()=0
 Returns true if the node has attributes. More...
 
virtual size_t GetAttributeCount ()=0
 Returns the number of attributes. More...
 
virtual CefString GetAttribute (int index)=0
 Returns the value of the attribute at the specified 0-based index. More...
 
virtual CefString GetAttribute (const CefString &qualifiedName)=0
 Returns the value of the attribute with the specified qualified name. More...
 
virtual CefString GetAttribute (const CefString &localName, const CefString &namespaceURI)=0
 Returns the value of the attribute with the specified local name and namespace URI. More...
 
virtual CefString GetInnerXml ()=0
 Returns an XML representation of the current node's children. More...
 
virtual CefString GetOuterXml ()=0
 Returns an XML representation of the current node including its children. More...
 
virtual int GetLineNumber ()=0
 Returns the line number for the current node. More...
 
virtual bool MoveToAttribute (int index)=0
 Attribute nodes are not traversed by default. More...
 
virtual bool MoveToAttribute (const CefString &qualifiedName)=0
 Moves the cursor to the attribute with the specified qualified name. More...
 
virtual bool MoveToAttribute (const CefString &localName, const CefString &namespaceURI)=0
 Moves the cursor to the attribute with the specified local name and namespace URI. More...
 
virtual bool MoveToFirstAttribute ()=0
 Moves the cursor to the first attribute in the current element. More...
 
virtual bool MoveToNextAttribute ()=0
 Moves the cursor to the next attribute in the current element. More...
 
virtual bool MoveToCarryingElement ()=0
 Moves the cursor back to the carrying element. More...
 
- Public Member Functions inherited from CefBaseRefCounted
virtual void AddRef () const =0
 Called to increment the reference count for the object. More...
 
virtual bool Release () const =0
 Called to decrement the reference count for the object. More...
 
virtual bool HasOneRef () const =0
 Returns true if the reference count is 1. More...
 
virtual bool HasAtLeastOneRef () const =0
 Returns true if the reference count is at least 1. More...
 

Static Public Member Functions

static CefRefPtr< CefXmlReaderCreate (CefRefPtr< CefStreamReader > stream, EncodingType encodingType, const CefString &URI)
 Create a new CefXmlReader object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CefBaseRefCounted
virtual ~CefBaseRefCounted ()
 

Detailed Description

Class that supports the reading of XML data via the libxml streaming API.

The methods of this class should only be called on the thread that creates the object.

Member Typedef Documentation

◆ EncodingType

◆ NodeType

Member Function Documentation

◆ Close()

virtual bool CefXmlReader::Close ( )
pure virtual

Close the document.

This should be called directly to ensure that cleanup occurs on the correct thread.

◆ Create()

static CefRefPtr<CefXmlReader> CefXmlReader::Create ( CefRefPtr< CefStreamReader stream,
EncodingType  encodingType,
const CefString URI 
)
static

Create a new CefXmlReader object.

The returned object's methods can only be called from the thread that created the object.

◆ GetAttribute() [1/3]

virtual CefString CefXmlReader::GetAttribute ( const CefString localName,
const CefString namespaceURI 
)
pure virtual

Returns the value of the attribute with the specified local name and namespace URI.

◆ GetAttribute() [2/3]

virtual CefString CefXmlReader::GetAttribute ( const CefString qualifiedName)
pure virtual

Returns the value of the attribute with the specified qualified name.

◆ GetAttribute() [3/3]

virtual CefString CefXmlReader::GetAttribute ( int  index)
pure virtual

Returns the value of the attribute at the specified 0-based index.

◆ GetAttributeCount()

virtual size_t CefXmlReader::GetAttributeCount ( )
pure virtual

Returns the number of attributes.

◆ GetBaseURI()

virtual CefString CefXmlReader::GetBaseURI ( )
pure virtual

Returns the base URI of the node.

See http://www.w3.org/TR/xmlbase/ for additional details.

◆ GetDepth()

virtual int CefXmlReader::GetDepth ( )
pure virtual

Returns the node depth.

Depth starts at 0 for the root node.

◆ GetError()

virtual CefString CefXmlReader::GetError ( )
pure virtual

Returns the error string.

◆ GetInnerXml()

virtual CefString CefXmlReader::GetInnerXml ( )
pure virtual

Returns an XML representation of the current node's children.

◆ GetLineNumber()

virtual int CefXmlReader::GetLineNumber ( )
pure virtual

Returns the line number for the current node.

◆ GetLocalName()

virtual CefString CefXmlReader::GetLocalName ( )
pure virtual

Returns the local name.

See http://www.w3.org/TR/REC-xml-names/#NT-LocalPart for additional details.

◆ GetNamespaceURI()

virtual CefString CefXmlReader::GetNamespaceURI ( )
pure virtual

Returns the URI defining the namespace associated with the node.

See http://www.w3.org/TR/REC-xml-names/ for additional details.

◆ GetOuterXml()

virtual CefString CefXmlReader::GetOuterXml ( )
pure virtual

Returns an XML representation of the current node including its children.

◆ GetPrefix()

virtual CefString CefXmlReader::GetPrefix ( )
pure virtual

Returns the namespace prefix.

See http://www.w3.org/TR/REC-xml-names/ for additional details.

◆ GetQualifiedName()

virtual CefString CefXmlReader::GetQualifiedName ( )
pure virtual

Returns the qualified name, equal to (Prefix:)LocalName.

See http://www.w3.org/TR/REC-xml-names/#ns-qualnames for additional details.

◆ GetType()

virtual NodeType CefXmlReader::GetType ( )
pure virtual

The below methods retrieve data for the node at the current cursor position.

Returns the node type.

◆ GetValue()

virtual CefString CefXmlReader::GetValue ( )
pure virtual

Returns the text value.

◆ GetXmlLang()

virtual CefString CefXmlReader::GetXmlLang ( )
pure virtual

Returns the xml:lang scope within which the node resides.

See http://www.w3.org/TR/REC-xml/#sec-lang-tag for additional details.

◆ HasAttributes()

virtual bool CefXmlReader::HasAttributes ( )
pure virtual

Returns true if the node has attributes.

◆ HasError()

virtual bool CefXmlReader::HasError ( )
pure virtual

Returns true if an error has been reported by the XML parser.

◆ HasValue()

virtual bool CefXmlReader::HasValue ( )
pure virtual

Returns true if the node has a text value.

◆ IsEmptyElement()

virtual bool CefXmlReader::IsEmptyElement ( )
pure virtual

Returns true if the node represents an empty element.

"<a/>" is considered empty but "<a></a>" is not.

◆ MoveToAttribute() [1/3]

virtual bool CefXmlReader::MoveToAttribute ( const CefString localName,
const CefString namespaceURI 
)
pure virtual

Moves the cursor to the attribute with the specified local name and namespace URI.

Returns true if the cursor position was set successfully.

◆ MoveToAttribute() [2/3]

virtual bool CefXmlReader::MoveToAttribute ( const CefString qualifiedName)
pure virtual

Moves the cursor to the attribute with the specified qualified name.

Returns true if the cursor position was set successfully.

◆ MoveToAttribute() [3/3]

virtual bool CefXmlReader::MoveToAttribute ( int  index)
pure virtual

Attribute nodes are not traversed by default.

The below methods can be used to move the cursor to an attribute node. MoveToCarryingElement() can be called afterwards to return the cursor to the carrying element. The depth of an attribute node will be 1 + the depth of the carrying element. Moves the cursor to the attribute at the specified 0-based index. Returns true if the cursor position was set successfully.

◆ MoveToCarryingElement()

virtual bool CefXmlReader::MoveToCarryingElement ( )
pure virtual

Moves the cursor back to the carrying element.

Returns true if the cursor position was set successfully.

◆ MoveToFirstAttribute()

virtual bool CefXmlReader::MoveToFirstAttribute ( )
pure virtual

Moves the cursor to the first attribute in the current element.

Returns true if the cursor position was set successfully.

◆ MoveToNextAttribute()

virtual bool CefXmlReader::MoveToNextAttribute ( )
pure virtual

Moves the cursor to the next attribute in the current element.

Returns true if the cursor position was set successfully.

◆ MoveToNextNode()

virtual bool CefXmlReader::MoveToNextNode ( )
pure virtual

Moves the cursor to the next node in the document.

This method must be called at least once to set the current cursor position. Returns true if the cursor position was set successfully.


The documentation for this class was generated from the following file: