summaryrefslogtreecommitdiff
path: root/core/fxcrt/xml/cxml_element.h
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2018-04-16 19:54:47 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-16 19:54:47 +0000
commita8c23df288d6fdfa2591ec43843ab3090bd95951 (patch)
tree8ec8f1c3596fd389a65e884917b5d785cc080eae /core/fxcrt/xml/cxml_element.h
parenta7b15598587d5bd04a086a8007327f06c14119b4 (diff)
downloadpdfium-a8c23df288d6fdfa2591ec43843ab3090bd95951.tar.xz
Remove CXML
This CL deletes the CXML parser as it is no longer used. Change-Id: Ic4815b683515ee860a6ae5c7ca39e15573e584bc Reviewed-on: https://pdfium-review.googlesource.com/30694 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core/fxcrt/xml/cxml_element.h')
-rw-r--r--core/fxcrt/xml/cxml_element.h73
1 files changed, 0 insertions, 73 deletions
diff --git a/core/fxcrt/xml/cxml_element.h b/core/fxcrt/xml/cxml_element.h
deleted file mode 100644
index d3049d77a4..0000000000
--- a/core/fxcrt/xml/cxml_element.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef CORE_FXCRT_XML_CXML_ELEMENT_H_
-#define CORE_FXCRT_XML_CXML_ELEMENT_H_
-
-#include <memory>
-#include <utility>
-#include <vector>
-
-#include "core/fxcrt/xml/cxml_attritem.h"
-#include "core/fxcrt/xml/cxml_object.h"
-
-class CXML_Element : public CXML_Object {
- public:
- static std::unique_ptr<CXML_Element> Parse(const void* pBuffer, size_t size);
-
- CXML_Element(const CXML_Element* pParent,
- const ByteStringView& qSpace,
- const ByteStringView& tagname);
- ~CXML_Element() override;
-
- // CXML_Object:
- CXML_Element* AsElement() override;
- const CXML_Element* AsElement() const override;
-
- ByteString GetTagName() const;
- ByteString GetNamespaceURI(const ByteString& qName) const;
- const CXML_Element* GetParent() const { return m_pParent.Get(); }
- size_t CountAttrs() const { return m_AttrMap.size(); }
- void GetAttrByIndex(size_t index,
- ByteString* space,
- ByteString* name,
- WideString* value) const;
- WideString GetAttrValue(const ByteStringView& name) const;
-
- int GetAttrInteger(const ByteStringView& name) const;
-
- void AppendChild(std::unique_ptr<CXML_Object> child) {
- m_Children.push_back(std::move(child));
- }
-
- size_t CountChildren() const { return m_Children.size(); }
- size_t CountElements(const ByteStringView& space,
- const ByteStringView& tag) const;
- CXML_Object* GetChild(size_t index) const;
- CXML_Element* GetElement(const ByteStringView& space,
- const ByteStringView& tag,
- size_t nth) const;
-
- void SetAttribute(const ByteString& space,
- const ByteString& name,
- const WideString& value);
-
- private:
- static bool MatchesElement(const CXML_Element* pKid,
- const ByteStringView& space,
- const ByteStringView& tag);
-
- const WideString* Lookup(const ByteString& space,
- const ByteString& name) const;
-
- UnownedPtr<const CXML_Element> const m_pParent;
- const ByteString m_QSpaceName;
- const ByteString m_TagName;
- std::vector<CXML_AttrItem> m_AttrMap;
- std::vector<std::unique_ptr<CXML_Object>> m_Children;
-};
-
-#endif // CORE_FXCRT_XML_CXML_ELEMENT_H_