anchor.diff:    pack: IXMLPack;
   begin
     pack := NewPack;
  -  Check(pack.Node('/root').Name = 'root');
  -  Check(pack.Node('/root/group').Name = 'group');
  -  Check(pack.Node('/root/group').Childs.Count = 2);
  -  Check(assigned(pack.Node('/root/group/item/name')));
  -  Check(assigned(pack.Node('/root/footer/name')));
  +  check(pack.Node('/root').Name = 'root');
  +  check(pack.Node('/root/group').Name = 'group');
  +  check(pack.Node('/root/group').Childs.Count = 2);
  +  check(assigned(pack.Node('/root/group/item/name')));
  +  check(assigned(pack.Node('/root/footer/name')));
   end;
   
   procedure TCoreTests.XMLNode;
  
positive.code: begin
    pack := NewPack;
    nodes := pack.Nodes('/root/group/*');
    Check(nodes.Count = 2);
    Check(assigned(nodes.Item('item'))); // by name, get the first
    Check(assigned(nodes.Item(0)));
    Check(assigned(nodes.Item(1)));
    with pack.Node('/root/group') do
    begin
      Add('new').Text('foo');
      Check(nodes.Count = 2); // have not changed nodes list - correct
      Check(pack.Nodes('/root/group/*').Count = 3); // new list
    end;
    nodes := pack.Nodes('/root/group/item[@b=''2'']');
    Check(assigned(nodes), 'nodes by @id');
    Check(nodes.Count > 0, 'nodes count');
    Check(assigned(nodes.Item(0)), 'nodes has item');
    Check(nodes.Item(0).Attrs.Count = 3, 'nodes.attrs.count');
    nodes := pack.Nodes('/root/group/item[@a=''1'']');
    Check(nodes.Count = 2, 'nodes.count for @a');
    nodes := pack.Nodes('/root/group/item[@xpto=''otpx'']');
    Check(nodes.Count = 0, 'nodes.count empty');
  end;
  
  procedure TCoreTests.XMLChilds;
  
negative.code: begin
    pack := NewPack;
    node := pack.Node('/root/group/item');
    check(assigned(node.Attrs));
    with node.Attrs do
    begin
      check(Count = 3);
      with Item(0) do
      begin
        check(Name = 'a', 'a name');
        check(Text = '1', 'a text');
      end;
      with Item(1) do
      begin
        check(Name = 'b', 'b name');
        check(Text = '2', 'b text');
      end;
      with Item(2) do
      begin
        check(Name = 'c', 'c name');
        check(Text = '3', 'c text');
      end;
    end;
  end;
  