Esempio n. 1
0
	void TreeMaker::OnText (std::string const & text)
	{
		Assert (_curr != 0); // Parser must not allow such call
		std::auto_ptr<Node> child (new Node (std::string ()));
		Node * newChild = _curr->AddChild (child);
		newChild->AddAttribute ("Text", text);
	}
Esempio n. 2
0
	void Node::AddText (std::string const & text)
	{
		if (_closed)
			throw XML::Exception ("Cannot add text to a closed XML node");
		// text as a nameless child with Text attribute
		std::auto_ptr<Node> child (new Node (std::string ()));
		Node * newChild = AddChild (child);
		newChild->AddAttribute ("Text", text);
	}