Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for ProcInst (0.32 sec)

  1. src/encoding/xml/xml_test.go

    }
    
    func TestProcInstEncoding(t *testing.T) {
    	for _, test := range procInstTests {
    		if got := procInst("version", test.input); got != test.expect[0] {
    			t.Errorf("procInst(version, %q) = %q; want %q", test.input, got, test.expect[0])
    		}
    		if got := procInst("encoding", test.input); got != test.expect[1] {
    			t.Errorf("procInst(encoding, %q) = %q; want %q", test.input, got, test.expect[1])
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 36.9K bytes
    - Viewed (0)
  2. src/encoding/xml/xml.go

    // Copy creates a new copy of Comment.
    func (c Comment) Copy() Comment { return Comment(bytes.Clone(c)) }
    
    // A ProcInst represents an XML processing instruction of the form <?target inst?>
    type ProcInst struct {
    	Target string
    	Inst   []byte
    }
    
    // Copy creates a new copy of ProcInst.
    func (p ProcInst) Copy() ProcInst {
    	p.Inst = bytes.Clone(p.Inst)
    	return p
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 18:46:41 UTC 2024
    - 47.3K bytes
    - Viewed (0)
  3. src/encoding/xml/marshal_test.go

    	toks: []Token{
    		ProcInst{"Target", []byte("Instruction")},
    	},
    	want: `<?Target Instruction?>`,
    }, {
    	desc: "proc instruction with empty target",
    	toks: []Token{
    		ProcInst{"", []byte("Instruction")},
    	},
    	err: "xml: EncodeToken of ProcInst with invalid Target",
    }, {
    	desc: "proc instruction with bad content",
    	toks: []Token{
    		ProcInst{"", []byte("Instruction?>")},
    	},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 18:46:41 UTC 2024
    - 66K bytes
    - Viewed (0)
  4. src/encoding/xml/marshal.go

    		p.Write(t)
    		p.WriteString("-->")
    		return p.cachedWriteError()
    	case ProcInst:
    		// First token to be encoded which is also a ProcInst with target of xml
    		// is the xml declaration. The only ProcInst where target of xml is allowed.
    		if t.Target == "xml" && p.w.Buffered() != 0 {
    			return fmt.Errorf("xml: EncodeToken of ProcInst xml target only valid for xml declaration, first token encoded")
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 18:46:41 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"Name", Type, 0},
    		{"Name.Local", Field, 0},
    		{"Name.Space", Field, 0},
    		{"NewDecoder", Func, 0},
    		{"NewEncoder", Func, 0},
    		{"NewTokenDecoder", Func, 10},
    		{"ProcInst", Type, 0},
    		{"ProcInst.Inst", Field, 0},
    		{"ProcInst.Target", Field, 0},
    		{"StartElement", Type, 0},
    		{"StartElement.Attr", Field, 0},
    		{"StartElement.Name", Field, 0},
    		{"SyntaxError", Type, 0},
    		{"SyntaxError.Line", Field, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  6. api/go1.txt

    pkg encoding/xml, type Name struct
    pkg encoding/xml, type Name struct, Local string
    pkg encoding/xml, type Name struct, Space string
    pkg encoding/xml, type ProcInst struct
    pkg encoding/xml, type ProcInst struct, Inst []uint8
    pkg encoding/xml, type ProcInst struct, Target string
    pkg encoding/xml, type StartElement struct
    pkg encoding/xml, type StartElement struct, Attr []Attr
    pkg encoding/xml, type StartElement struct, Name Name
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
Back to top