DTDParser

package
v0.0.0-...-0cd33ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package DTDParser A DTD parser

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct {
	WithComments      bool
	IgnoreExtRefIssue bool
	Filepath          string
	Collection        []DTD.IDTDBlock

	Overwrite bool
	Log       *zap.SugaredLogger
	Package   string
	// contains filtered or unexported fields
}

Parser is a structure that represents the parser it can manage multiple DTD parsers

func NewDTDParser

func NewDTDParser(Log *zap.SugaredLogger) *Parser

NewDTDParser returns a new DTD parser

func (*Parser) Parse

func (p *Parser) Parse(filePath string)

Parse Parse a DTD using its path

func (*Parser) Render

func (p *Parser) Render(parentDir string)

RenderDTD Render a collection to a or a set of DTD files

func (*Parser) SetExportEntity

func (p *Parser) SetExportEntity(name string)

SetExportEntity Mark an entity block are exported in the collection

func (*Parser) SetFormatter

func (p *Parser) SetFormatter(s string)

SetFormatter Setter for formatter

func (*Parser) SetOutputPath

func (p *Parser) SetOutputPath(s string)

SetOutputPath set the output path of the DTD to export the DTD

func (*Parser) SetStructPath

func (p *Parser) SetStructPath(s string)

SetStructPath set the output path to export the DTD a go Struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL