top | up | prev | next

dom Namespace

Classes

class Attr
class BuildIndexVisitor
class CDataSection
class CharacterData
class Comment
class Document
class DocumentFragment
class DomDocumentHandler
class DomException
class Element
class ElementsByTagNameVisitor
class EntityReference
class Node
class NodeList
class NodeOp
class ParentNode
class ProcessingInstruction
class Text
class Visitor

Functions

std::u32string AttrValueEscape(const std::u32string& attributeValue, char32_t delimiter)
std::u32string AxisName(Axis axis)
std::u32string MakeXmlAttrValue(const std::u32string& attributeValue)
std::unique_ptr<Document> ParseDocument(const std::u32string& content, const std::string& systemId)
std::unique_ptr<Document> ParseDocument(const std::u32string& content, const std::string& systemId, Flags flags)
std::unique_ptr<Document> ReadDocument(const std::string& fileName)
std::unique_ptr<Document> ReadDocument(const std::string& fileName, Flags flags)
std::unique_ptr<Document> ReceiveDocument(soulng::util::TcpSocket& socket)
void SendDocument(soulng::util::TcpSocket& socket, Document& document)
std::u32string XmlCharDataEscape(const std::u32string& charData)
Flags operator&(Flags flags, Flags flag) inline
Flags operator|(Flags flags, Flags flag) inline
Flags operator~(Flags flags) inline

Enumerations

enum class Axis
enum class Flags
enum class NodeType

Function Details

AttrValueEscape Function

std::u32string sngxml::dom::AttrValueEscape(const std::u32string& attributeValue, char32_t delimiter)

Definition at line 13 of Element.cpp


AxisName Function

std::u32string sngxml::dom::AxisName(Axis axis)

Definition at line 22 of Node.cpp
Declaration at line 60 of Node.hpp


MakeXmlAttrValue Function

std::u32string sngxml::dom::MakeXmlAttrValue(const std::u32string& attributeValue)

Definition at line 30 of Element.cpp

Called by: sngxml::dom::Attr::Write


ParseDocument Function

std::unique_ptr<Document > sngxml::dom::ParseDocument(const std::u32string& content, const std::string& systemId)

Definition at line 191 of Parser.cpp :
192 {
193     return ParseDocument(contentsystemIdFlags::none);
194 }


Declaration at line 33 of Parser.hpp


ParseDocument Function

std::unique_ptr<Document > sngxml::dom::ParseDocument(const std::u32string& content, const std::string& systemId, Flags flags)

Definition at line 196 of Parser.cpp :
197 {
198     DomDocumentHandler domDocumentHandler;
199     sngxml::xml::Flags xmlFlags = sngxml::xml::Flags::none;
200     if ((flags & Flags::debug) != Flags::none)
201     {
202         xmlFlags = xmlFlags | sngxml::xml::Flags::debug;
203     }
204     ParseXmlContent(contentsystemId&domDocumentHandlerxmlFlags);
205     return domDocumentHandler.GetDocument();
206 }


Declaration at line 34 of Parser.hpp

Calls: sngxml::dom::DomDocumentHandler::GetDocument


ReadDocument Function

std::unique_ptr<Document > sngxml::dom::ReadDocument(const std::string& fileName)

Definition at line 208 of Parser.cpp :
209 {
210     return ReadDocument(fileNameFlags::none);
211 }


Declaration at line 35 of Parser.hpp


ReadDocument Function

std::unique_ptr<Document > sngxml::dom::ReadDocument(const std::string& fileName, Flags flags)

Definition at line 213 of Parser.cpp :
214 {
215     std::u32string content = ToUtf32(ReadFile(fileName));
216     return ParseDocument(contentfileNameflags);
217 }


Declaration at line 36 of Parser.hpp


ReceiveDocument Function

std::unique_ptr<Document > sngxml::dom::ReceiveDocument(soulng::util::TcpSocket& socket)

Definition at line 227 of Parser.cpp :
228 {
229     std::string str = ReadStr(socket);
230     if (str.empty()) return std::unique_ptr<Document>();
231     std::u32string content = ToUtf32(str);
232     std::unique_ptr<Document> doc = ParseDocument(content"socket");
233     return doc;
234 }


Declaration at line 38 of Parser.hpp


SendDocument Function

void sngxml::dom::SendDocument(soulng::util::TcpSocket& socket, Document & document)

Definition at line 219 of Parser.cpp :
220 {
221     std::stringstream sstream;
222     CodeFormatter formatter(sstream);
223     document.Write(formatter);
224     Write(socketsstream.str());
225 }


Declaration at line 37 of Parser.hpp

Calls: sngxml::dom::Document::Write


XmlCharDataEscape Function

std::u32string sngxml::dom::XmlCharDataEscape(const std::u32string& charData)

Definition at line 13 of CharacterData.cpp
Declaration at line 12 of CharacterData.hpp

Called by: sngxml::dom::CharacterData::Write


operator& Function

Flags sngxml::dom::operator&(Flags flags, Flags flag) inline

Definition at line 18 of Parser.hpp :
19 {
20     return static_cast<Flags>(static_cast<int>(flags) & static_cast<int>(flag));
21 }



operator| Function

Flags sngxml::dom::operator|(Flags flags, Flags flag) inline

Definition at line 23 of Parser.hpp :
24 {
25     return static_cast<Flags>(static_cast<int>(flags) | static_cast<int>(flag));
26 }



operator~ Function

Flags sngxml::dom::operator~(Flags flags) inline

Definition at line 28 of Parser.hpp :
29 {
30     return static_cast<Flags>(~static_cast<int>(flags));
31 }



top | up | prev | next