예제 #1
0
파일: tNamespace.cpp 프로젝트: achacha/AOS
void __insert(AObjectContainer& ns)
{
  AFile_AString f("<inserted><var a=1 b=2 c=3/><mixed>foo<bar/>baz</mixed></inserted>");
  AXmlElement element;
  element.fromAFile(f);
  ARope rope;
  element.emitXml(rope);
//  element.debugDump(std::cout, 0);
//  std::cout << rope << std::endl;

  AObjectContainer nsNew;
  nsNew.fromElement(element);
  rope.clear();
  element.clear();
  nsNew.publish(element);
//  nsNew.debugDump(std::cout, 0);

  element.debugDump(std::cout, 0);
  element.emitXml(rope);
//  std::cout << rope << std::endl;

  ns.insert("/incoming/", nsNew.clone());
//  ns.debugDump(std::cout, 0);
}