Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

CXMLElement Class Reference

#include <XML.h>

Inheritance diagram for CXMLElement:

CXMLNode List of all members.

Public Member Functions

 CXMLElement (CXMLElement *pParent=NULL, LPCTSTR pszName=NULL)
virtual ~CXMLElement ()
CXMLElementClone (CXMLElement *pParent=NULL)
CXMLElementDetach ()
CXMLElementAddElement (LPCTSTR pszName)
CXMLElementAddElement (CXMLElement *pElement)
int GetElementCount () const
CXMLElementGetFirstElement () const
POSITION GetElementIterator () const
CXMLElementGetNextElement (POSITION &pos) const
CXMLElementGetElementByName (LPCTSTR pszName) const
CXMLElementGetElementByName (LPCTSTR pszName, BOOL bCreate)
void RemoveElement (CXMLElement *pElement)
void DeleteAllElements ()
CXMLAttributeAddAttribute (LPCTSTR pszName, LPCTSTR pszValue=NULL)
CXMLAttributeAddAttribute (CXMLAttribute *pAttribute)
int GetAttributeCount () const
POSITION GetAttributeIterator () const
CXMLAttributeGetNextAttribute (POSITION &pos) const
CXMLAttributeGetAttribute (LPCTSTR pszName) const
CString GetAttributeValue (LPCTSTR pszName, LPCTSTR pszDefault=NULL) const
void RemoveAttribute (CXMLAttribute *pAttribute)
void DeleteAttribute (LPCTSTR pszName)
void DeleteAllAttributes ()
CString ToString (BOOL bHeader=FALSE, BOOL bNewline=FALSE)
void ToString (CString &strXML, BOOL bNewline=FALSE)
BOOL ParseString (LPCTSTR &strXML)
BOOL Equals (CXMLElement *pXML) const
CString GetRecursiveWords ()
void AddRecursiveWords (CString &strWords)

Static Public Member Functions

static CXMLElementFromString (LPCTSTR pszXML, BOOL bHeader=FALSE)
static CXMLElementFromBytes (BYTE *pByte, DWORD nByte, BOOL bHeader=FALSE)
static CXMLElementFromFile (LPCTSTR pszPath, BOOL bHeader=FALSE)
static CXMLElementFromFile (HANDLE hFile, BOOL bHeader=FALSE)

Protected Attributes

CAtlList< CXMLElement * > m_pElements
CAtlMap< CString, CXMLAttribute *,
CStringElementTraits< CString > > 
m_pAttributes

Constructor & Destructor Documentation

CXMLElement::CXMLElement CXMLElement pParent = NULL,
LPCTSTR  pszName = NULL
 

Definition at line 326 of file XML.cpp.

References CXMLNode::m_nNode, and CXMLNode::xmlElement.

Referenced by AddElement(), Clone(), FromString(), and ParseString().

CXMLElement::~CXMLElement  )  [virtual]
 

Definition at line 331 of file XML.cpp.

References DeleteAllAttributes(), and DeleteAllElements().


Member Function Documentation

CXMLAttribute * CXMLElement::AddAttribute CXMLAttribute pAttribute  )  [inline]
 

Definition at line 195 of file XML.inl.

References m_pAttributes, and NULL.

CXMLAttribute * CXMLElement::AddAttribute LPCTSTR  pszName,
LPCTSTR  pszValue = NULL
[inline]
 

Definition at line 178 of file XML.inl.

References GetAttribute(), m_pAttributes, and CXMLNode::SetValue().

Referenced by CContactProfilePage::AddAddress(), CLocalSearch::AddMetadata(), CDownloadWithSources::AddSourceHit(), CLocalSearch::AlbumToPacket(), CQueryHit::AutoDetectAudio(), CCollectionFile::CloneMetadata(), CLibraryBuilderInternals::CopyID3v1Field(), CLibraryBuilderInternals::CopyID3v2Field(), CLibraryBuilderInternals::CopyVersionField(), CGProfile::Create(), CCollectionExportDlg::CreateXML(), CRelatedSearch::CRelatedSearch(), CBitziDownloader::ImportData(), CSchema::Instantiate(), CSchemaChild::MemberCopy(), CFolderPropertiesDlg::OnChangeTitle(), CFavouritesProfilePage::OnOK(), CSecurityWnd::OnSecurityExport(), CLibraryBuilderInternals::ReadAPE(), CLibraryBuilderInternals::ReadASF(), CLibraryBuilderInternals::ReadAVI(), CLibraryBuilderInternals::ReadBMP(), CLibraryBuilderInternals::ReadCHM(), CQueryHit::ReadEDPacket(), CLibraryBuilderInternals::ReadGIF(), CLibraryBuilderInternals::ReadID3v1(), CLibraryBuilderInternals::ReadID3v2(), CLibraryBuilderInternals::ReadJPEG(), CLibraryBuilderInternals::ReadMPEG(), CLibraryBuilderInternals::ReadOGG(), CLibraryBuilderInternals::ReadPDF(), CLibraryBuilderInternals::ReadPNG(), CLibraryBuilderInternals::ReadVersion(), CLibraryFrame::RunLocalSearch(), CRelatedSearch::RunSearchForAlbum(), CRelatedSearch::RunSearchForArtist(), CRelatedSearch::RunSearchForSeries(), CLibraryFile::SaveMetadata(), CLibraryBuilderInternals::ScanMP3Frame(), CSecureRule::ToXML(), CSecurity::ToXML(), and CFilePropertiesDlg::Update().

CXMLElement * CXMLElement::AddElement CXMLElement pElement  )  [inline]
 

Definition at line 119 of file XML.inl.

References m_pElements, and NULL.

CXMLElement * CXMLElement::AddElement LPCTSTR  pszName  )  [inline]
 

Definition at line 112 of file XML.inl.

References CXMLElement(), and m_pElements.

Referenced by CContactProfilePage::AddAddress(), CSkinsSettingsPage::AddSkin(), CLanguageDlg::AddSkin(), CDownloadWithSources::AddSourceHit(), CLocalSearch::AlbumToPacket(), CCollectionFile::CloneMetadata(), CGProfile::Create(), CCollectionExportDlg::CreateXML(), CFolderPropertiesDlg::DoApply(), CQueryHit::FromPacket(), GetElementByName(), CSearchPadWnd::GetSearch(), CSearchPanel::GetSearch(), CBitziDownloader::ImportData(), CAlbumFolder::MetaToFiles(), CUploadTransferHTTP::OnHeadersComplete(), CFileMetadataPage::OnInitDialog(), CFileMetadataPage::OnOK(), CNewSearchDlg::OnOK(), CFilePropertiesDlg::OnOK(), CSecurityWnd::OnSecurityExport(), CQuerySearch::ReadG2Packet(), CQueryHit::ReadXML(), CLibraryFrame::RunLocalSearch(), CRelatedSearch::RunSearchForAlbum(), CRelatedSearch::RunSearchForArtist(), CRelatedSearch::RunSearchForSeries(), CLibraryFile::SaveMetadata(), CLibraryBuilder::SubmitMetadata(), and CSecurity::ToXML().

void CXMLElement::AddRecursiveWords CString &  strWords  ) 
 

Definition at line 712 of file XML.cpp.

References GetAttributeIterator(), GetElementIterator(), CXMLNode::GetName(), GetNextAttribute(), GetNextElement(), CXMLNode::GetValue(), and CXMLNode::m_sValue.

Referenced by GetRecursiveWords().

CXMLElement * CXMLElement::Clone CXMLElement pParent = NULL  ) 
 

Definition at line 340 of file XML.cpp.

References Clone(), CXMLElement(), GetAttributeIterator(), GetElementIterator(), GetNextAttribute(), GetNextElement(), m_pAttributes, m_pElements, CXMLNode::m_sName, and CXMLNode::m_sValue.

Referenced by CDownloadWithSources::AddSourceHit(), CLocalSearch::AlbumToPacket(), CCollectionFile::File::ApplyMetadata(), Clone(), CCollectionFile::CloneMetadata(), CCollectionExportDlg::CopyMetadata(), CQuerySearch::CQuerySearch(), CBitziDownloader::MergeMetaData(), CAlbumFolder::MetaToFiles(), CUploadTransferHTTP::OnHeadersComplete(), CDecodeMetadataDlg::OnOK(), CLibraryFile::SaveMetadata(), and CFilePropertiesDlg::Update().

void CXMLElement::DeleteAllAttributes  ) 
 

Definition at line 377 of file XML.cpp.

References m_pAttributes, NULL, and XMLVOID.

Referenced by ~CXMLElement().

void CXMLElement::DeleteAllElements  ) 
 

Definition at line 368 of file XML.cpp.

References m_pElements.

Referenced by ~CXMLElement().

void CXMLElement::DeleteAttribute LPCTSTR  pszName  )  [inline]
 

Definition at line 247 of file XML.inl.

References CXMLNode::Delete(), and GetAttribute().

Referenced by CLocalSearch::GetXMLString().

CXMLElement * CXMLElement::Detach  )  [inline]
 

Definition at line 102 of file XML.inl.

References CXMLNode::m_pParent, NULL, and RemoveElement().

Referenced by CLibraryBuilderPlugins::ExtractMetadata(), CLocalSearch::GetXMLString(), CSkin::LoadDialogs(), CSkin::LoadDocuments(), CSkinWindow::Parse(), CQueryHit::ParseXML(), CQueryHit::ReadG2Packet(), CAlbumFolder::SetMetadata(), and CLibraryBuilder::SubmitMetadata().

BOOL CXMLElement::Equals CXMLElement pXML  )  const
 

Definition at line 663 of file XML.cpp.

References Equals(), CXMLAttribute::Equals(), GetAttribute(), GetAttributeCount(), GetAttributeIterator(), GetElementCount(), GetElementIterator(), GetNextAttribute(), GetNextElement(), CXMLNode::m_sName, CXMLNode::m_sValue, and NULL.

Referenced by Equals(), and CLibraryFile::SetMetadata().

CXMLElement * CXMLElement::FromBytes BYTE *  pByte,
DWORD  nByte,
BOOL  bHeader = FALSE
[static]
 

Definition at line 585 of file XML.cpp.

References FromString(), and NULL.

Referenced by FromFile(), CSecurity::Import(), and CWorldGPS::Load().

CXMLElement * CXMLElement::FromFile HANDLE  hFile,
BOOL  bHeader = FALSE
[static]
 

Definition at line 645 of file XML.cpp.

References FromBytes(), and NULL.

CXMLElement * CXMLElement::FromFile LPCTSTR  pszPath,
BOOL  bHeader = FALSE
[static]
 

Definition at line 631 of file XML.cpp.

References NULL.

Referenced by CVendorCache::Load(), CGProfile::Load(), CSchema::LoadDescriptor(), CSkin::LoadFromFile(), CLibraryFile::LoadMetadata(), CSchema::LoadSchema(), and CEmoticons::LoadTrillian().

CXMLElement * CXMLElement::FromString LPCTSTR  pszXML,
BOOL  bHeader = FALSE
[static]
 

Definition at line 442 of file XML.cpp.

References CXMLElement(), NULL, CXMLNode::ParseMatch(), and ParseString().

Referenced by CSkinsSettingsPage::AddSkin(), CLanguageDlg::AddSkin(), CBitziDownloader::DecodeResponse(), FromBytes(), CQueryHit::FromPacket(), CSkin::LoadFromString(), CCollectionFile::LoadManifest(), CG2Neighbour::OnProfileDelivery(), CChatSession::OnProfileDelivery(), CHostBrowser::OnProfilePacket(), CBrowseTreeCtrl::OnTreePacket(), CQuerySearch::ReadG1Packet(), CQuerySearch::ReadG2Packet(), CQueryHit::ReadG2Packet(), CDownloadTransferHTTP::ReadMetadata(), CDownloadTransferHTTP::ReadTiger(), and CQueryHit::ReadXML().

CXMLAttribute * CXMLElement::GetAttribute LPCTSTR  pszName  )  const [inline]
 

Definition at line 223 of file XML.inl.

References m_pAttributes, NULL, and XMLVOID.

Referenced by AddAttribute(), DeleteAttribute(), Equals(), GetAttributeValue(), CSchema::LoadDescriptor(), CSchemaChild::MemberCopy(), CQueryHit::ParseXML(), CQuerySearch::ReadG2Packet(), and CFilePropertiesDlg::Update().

int CXMLElement::GetAttributeCount  )  const [inline]
 

Definition at line 205 of file XML.inl.

References m_pAttributes.

Referenced by Equals().

POSITION CXMLElement::GetAttributeIterator  )  const [inline]
 

Definition at line 210 of file XML.inl.

References m_pAttributes.

Referenced by AddRecursiveWords(), Clone(), CCollectionExportDlg::CopyMetadata(), Equals(), CQuerySearch::MatchMetadataShallow(), CBitziDownloader::MergeMetaData(), CDecodeMetadataDlg::OnOK(), and ToString().

CString CXMLElement::GetAttributeValue LPCTSTR  pszName,
LPCTSTR  pszDefault = NULL
const [inline]
 

Definition at line 231 of file XML.inl.

References GetAttribute(), and CXMLNode::m_sValue.

Referenced by CContactProfilePage::AddAddress(), CSkinsSettingsPage::AddSkin(), CLanguageDlg::AddSkin(), CDownloadWithFile::AppendMetadata(), CDownloadWithFile::AppendMetadataID3v1(), CSkin::Apply(), CRelatedSearch::CanSearchForAlbum(), CRelatedSearch::CanSearchForArtist(), CRelatedSearch::CanSearchForSeries(), CCollectionFile::CloneMetadata(), CGProfile::CreateAvatar(), CSkin::CreateMenu(), CSkin::CreateToolBar(), CSecurity::FromXML(), CGProfile::FromXML(), CGProfile::GetContact(), CIdentityProfilePage::GetGenderTranslations(), CGProfile::GetLocation(), CGProfile::GetNick(), CGProfile::GetPackedGPS(), CSchema::GetType(), CSchemaMember::GetValueFrom(), CSchemaChildMap::Load(), CSchemaChild::Load(), CSchemaBitzi::Load(), CSkin::LoadColourScheme(), CSkin::LoadCommandBitmap(), CSkin::LoadCommandMap(), CSchemaMember::LoadDescriptor(), CSchema::LoadDescriptor(), CSchema::LoadDescriptorBitziImport(), CSchema::LoadDescriptorExtends(), CSchema::LoadDescriptorHeaderContent(), CSchema::LoadDescriptorIcons(), CSchema::LoadDescriptorMembers(), CSchema::LoadDescriptorTitles(), CSchema::LoadDescriptorTypeFilter(), CSchema::LoadDescriptorViewContent(), CSkin::LoadDialogs(), CSchemaMember::LoadDisplay(), CSkin::LoadDocuments(), CSkin::LoadFonts(), CWorldCity::LoadFrom(), CVendor::LoadFrom(), CSkin::LoadFromXML(), CSkin::LoadListColumns(), CCollectionFile::LoadManifest(), CSkin::LoadMenu(), CLibraryFile::LoadMetadata(), CSchemaMember::LoadSchema(), CSchema::LoadSchema(), CSkin::LoadStrings(), CEmoticons::LoadTrillian(), CSchemaMember::LoadType(), CSkin::LoadWatermarks(), CRichDocument::LoadXML(), CRichDocument::LoadXMLStyles(), CBitziDownloader::LookupValue(), CFolderPropertiesDlg::OnChangeData(), CFavouritesProfilePage::OnInitDialog(), CContactProfilePage::OnInitDialog(), CSearchMonitorWnd::OnQuerySearch(), CAlbumFolder::OrganiseFile(), CSkinWindow::Parse(), CQueryHit::ParseXML(), CQuerySearch::ReadG1Packet(), CLibraryBuilderInternals::ReadID3v2(), CRelatedSearch::RunSearchForAlbum(), CRelatedSearch::RunSearchForArtist(), CRelatedSearch::RunSearchForSeries(), CSkinWindow::SelectRegion(), CEDNeighbour::SendSharedFiles(), CLibraryFile::SetMetadata(), CHomeTorrentsBox::Setup(), CHomeConnectionBox::Setup(), CHomeUploadsBox::Setup(), CHomeLibraryBox::Setup(), CHomeDownloadsBox::Setup(), CLibraryAlbumTrack::Update(), CBrowseProfileCtrl::UpdateDocument2(), and CSchema::Validate().

CXMLElement * CXMLElement::GetElementByName LPCTSTR  pszName,
BOOL  bCreate
[inline]
 

Definition at line 158 of file XML.inl.

References AddElement(), GetElementIterator(), CXMLNode::GetName(), GetNextElement(), and NULL.

CXMLElement * CXMLElement::GetElementByName LPCTSTR  pszName  )  const [inline]
 

Definition at line 148 of file XML.inl.

References GetElementIterator(), CXMLNode::GetName(), GetNextElement(), and NULL.

Referenced by CSkinsSettingsPage::AddSkin(), CLanguageDlg::AddSkin(), CGProfile::CreateAvatar(), CGProfile::GetContact(), CGProfile::GetLocation(), CGProfile::GetNick(), CGProfile::GetPackedGPS(), CSchemaMember::GetValueFrom(), CGProfile::GetXML(), CGProfile::IsValid(), CCollectionFile::LoadManifest(), CLibraryFile::LoadMetadata(), CEmoticons::LoadTrillian(), CRichDocument::LoadXMLStyles(), CBitziDownloader::LookupValue(), CContactProfilePage::OnInitDialog(), and CCollectionFile::File::Parse().

int CXMLElement::GetElementCount  )  const [inline]
 

Definition at line 127 of file XML.inl.

References m_pElements.

Referenced by CContactProfilePage::AddAddress(), Equals(), CSchemaMember::LoadSchema(), CSchema::LoadSchema(), and CRichDocument::LoadXML().

POSITION CXMLElement::GetElementIterator  )  const [inline]
 

Definition at line 138 of file XML.inl.

References m_pElements.

Referenced by CContactProfilePage::AddAddress(), AddRecursiveWords(), Clone(), CCollectionExportDlg::CopyMetadata(), CSkin::CreateToolBar(), Equals(), CSecurity::FromXML(), CGProfile::GetContact(), GetElementByName(), CIdentityProfilePage::GetGenderTranslations(), CSkinWindow::GetRegionSize(), CSchemaChild::Load(), CSchemaMember::LoadDescriptor(), CSchema::LoadDescriptor(), CSchema::LoadDescriptorBitziImport(), CSchema::LoadDescriptorExtends(), CSchema::LoadDescriptorIcons(), CSchema::LoadDescriptorMembers(), CSchema::LoadDescriptorTitles(), CSchema::LoadDescriptorViewContent(), CVendor::LoadFrom(), CVendorCache::LoadFrom(), CSkin::LoadFromXML(), CSkin::LoadListColumns(), CCollectionFile::LoadManifest(), CSchema::LoadPrimary(), CEmoticons::LoadTrillian(), CSchemaMember::LoadType(), CRichDocument::LoadXMLStyles(), CBitziDownloader::MergeMetaData(), CSkinWindow::Parse(), CQueryHit::ParseXML(), CSkinWindow::SelectRegion(), and ToString().

CXMLElement * CXMLElement::GetFirstElement  )  const [inline]
 

Definition at line 132 of file XML.inl.

References m_pElements, and NULL.

Referenced by CDownloadWithFile::AppendMetadata(), CQuerySearch::BuildWordList(), CCollectionFile::CloneMetadata(), CLibraryBuilderPlugins::ExtractMetadata(), CLibraryFile::LoadMetadata(), CSchemaMember::LoadSchema(), CSchema::LoadSchema(), CQuerySearch::MatchMetadata(), CNewSearchDlg::OnInitDialog(), CLibraryFile::SetMetadata(), CAlbumFolder::SetMetadata(), CSearchPanel::ShowSearch(), CQuerySearch::ToEDPacket(), CQuerySearch::ToG1Packet(), CQuerySearch::ToG2Packet(), CSearchWnd::UpdateMessages(), and CSchema::Validate().

CXMLAttribute * CXMLElement::GetNextAttribute POSITION &  pos  )  const [inline]
 

Definition at line 215 of file XML.inl.

References m_pAttributes, NULL, and XMLVOID.

Referenced by AddRecursiveWords(), Clone(), CCollectionExportDlg::CopyMetadata(), Equals(), CQuerySearch::MatchMetadataShallow(), CBitziDownloader::MergeMetaData(), CDecodeMetadataDlg::OnOK(), and ToString().

CXMLElement * CXMLElement::GetNextElement POSITION &  pos  )  const [inline]
 

Definition at line 143 of file XML.inl.

References m_pElements.

Referenced by CContactProfilePage::AddAddress(), AddRecursiveWords(), Clone(), CCollectionExportDlg::CopyMetadata(), CSkin::CreateToolBar(), Equals(), CSecurity::FromXML(), CGProfile::GetContact(), GetElementByName(), CIdentityProfilePage::GetGenderTranslations(), CSkinWindow::GetRegionSize(), CSchemaChild::Load(), CSchemaMember::LoadDescriptor(), CSchema::LoadDescriptor(), CSchema::LoadDescriptorBitziImport(), CSchema::LoadDescriptorExtends(), CSchema::LoadDescriptorIcons(), CSchema::LoadDescriptorMembers(), CSchema::LoadDescriptorTitles(), CSchema::LoadDescriptorViewContent(), CVendor::LoadFrom(), CVendorCache::LoadFrom(), CSkin::LoadFromXML(), CSkin::LoadListColumns(), CCollectionFile::LoadManifest(), CSchema::LoadPrimary(), CEmoticons::LoadTrillian(), CSchemaMember::LoadType(), CRichDocument::LoadXMLStyles(), CBitziDownloader::MergeMetaData(), CSkinWindow::Parse(), CQueryHit::ParseXML(), CSkinWindow::SelectRegion(), and ToString().

CString CXMLElement::GetRecursiveWords  ) 
 

Definition at line 701 of file XML.cpp.

References AddRecursiveWords().

Referenced by CSearchMonitorWnd::OnQuerySearch().

BOOL CXMLElement::ParseString LPCTSTR &  strXML  ) 
 

Definition at line 500 of file XML.cpp.

References CXMLElement(), m_pAttributes, m_pElements, CXMLNode::m_sName, CXMLNode::m_sValue, CXMLNode::ParseIdentifier(), CXMLNode::ParseMatch(), ParseString(), CXMLAttribute::ParseString(), CXMLNode::StringToValue(), and XMLVOID.

Referenced by FromString(), and ParseString().

void CXMLElement::RemoveAttribute CXMLAttribute pAttribute  )  [inline]
 

Definition at line 240 of file XML.inl.

References m_pAttributes.

Referenced by CXMLNode::Delete().

void CXMLElement::RemoveElement CXMLElement pElement  )  [inline]
 

Definition at line 169 of file XML.inl.

References m_pElements.

Referenced by CXMLNode::Delete(), and Detach().

void CXMLElement::ToString CString &  strXML,
BOOL  bNewline = FALSE
 

Definition at line 403 of file XML.cpp.

References GetAttributeIterator(), GetElementIterator(), GetNextAttribute(), GetNextElement(), CXMLNode::m_sName, CXMLNode::m_sValue, NULL, ToString(), CXMLAttribute::ToString(), and CXMLNode::ValueToString().

CString CXMLElement::ToString BOOL  bHeader = FALSE,
BOOL  bNewline = FALSE
 

Definition at line 393 of file XML.cpp.

Referenced by CLocalSearch::AddHitG2(), CLocalSearch::AlbumToPacket(), CCollectionExportDlg::OnOK(), CSecurityWnd::OnSecurityExport(), CUploadTransferHTTP::RequestMetadata(), CGProfile::Save(), CLibraryFile::SaveMetadata(), CQuerySearch::ToG1Packet(), CQuerySearch::ToG2Packet(), ToString(), and CDownloadWithFile::WriteMetadata().


Member Data Documentation

CAtlMap<CString, CXMLAttribute*, CStringElementTraits<CString> > CXMLElement::m_pAttributes [protected]
 

Definition at line 93 of file XML.h.

Referenced by AddAttribute(), Clone(), DeleteAllAttributes(), GetAttribute(), GetAttributeCount(), GetAttributeIterator(), GetNextAttribute(), ParseString(), and RemoveAttribute().

CAtlList<CXMLElement*> CXMLElement::m_pElements [protected]
 

Definition at line 92 of file XML.h.

Referenced by AddElement(), Clone(), DeleteAllElements(), GetElementCount(), GetElementIterator(), GetFirstElement(), GetNextElement(), ParseString(), and RemoveElement().


The documentation for this class was generated from the following files:
Generated on Thu Dec 15 10:40:14 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2