LLDB mainline
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
lldb_private::XMLDocument Class Reference

#include <XML.h>

Public Member Functions

 XMLDocument ()
 ~XMLDocument ()
 operator bool () const
bool IsValid () const
void Clear ()
bool ParseFile (const char *path)
bool ParseMemory (const char *xml, size_t xml_length, const char *url="untitled.xml")
XMLNode GetRootElement (const char *required_name=nullptr)
llvm::StringRef GetErrors () const

Static Public Member Functions

static void ErrorCallback (void *ctx, const char *format,...)
static bool XMLEnabled ()

Protected Attributes

XMLDocumentImpl m_document = nullptr
StreamString m_errors

Detailed Description

Definition at line 113 of file XML.h.

Constructor & Destructor Documentation

◆ XMLDocument()

XMLDocument::XMLDocument ( )

◆ ~XMLDocument()

XMLDocument::~XMLDocument ( )

Definition at line 21 of file XML.cpp.

References Clear().

Member Function Documentation

◆ Clear()

void XMLDocument::Clear ( )

Definition at line 23 of file XML.cpp.

References m_document.

Referenced by ParseFile(), ParseMemory(), and ~XMLDocument().

◆ ErrorCallback()

void XMLDocument::ErrorCallback ( void *  ctx,
const char *  format,

Definition at line 35 of file XML.cpp.

References lldb_private::Stream::EOL(), m_errors, and lldb_private::Stream::PrintfVarArg().

Referenced by ParseFile(), and ParseMemory().

◆ GetErrors()

llvm::StringRef XMLDocument::GetErrors ( ) const

◆ GetRootElement()

XMLNode XMLDocument::GetRootElement ( const char *  required_name = nullptr)

◆ IsValid()

bool XMLDocument::IsValid ( ) const

Definition at line 33 of file XML.cpp.

References m_document.

Referenced by GetRootElement(), operator bool(), ParseFile(), and ParseMemory().

◆ operator bool()

lldb_private::XMLDocument::operator bool ( ) const

Definition at line 119 of file XML.h.

References IsValid().

◆ ParseFile()

bool XMLDocument::ParseFile ( const char *  path)

Definition at line 44 of file XML.cpp.

References Clear(), ErrorCallback(), IsValid(), and m_document.

Referenced by lldb_private::ApplePropertyList::ParseFile().

◆ ParseMemory()

bool XMLDocument::ParseMemory ( const char *  xml,
size_t  xml_length,
const char *  url = "untitled.xml" 

◆ XMLEnabled()

bool XMLDocument::XMLEnabled ( )

Member Data Documentation

◆ m_document

XMLDocumentImpl lldb_private::XMLDocument::m_document = nullptr

Definition at line 141 of file XML.h.

Referenced by Clear(), GetRootElement(), IsValid(), ParseFile(), and ParseMemory().

◆ m_errors

StreamString lldb_private::XMLDocument::m_errors

Definition at line 142 of file XML.h.

Referenced by ErrorCallback(), and GetErrors().

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