Package libxml2 is an interface to libxml2 library, providing XML and HTML parsers with DOM interface. The inspiration is Perl5's XML::LibXML module. This library is still in very early stages of development. API may still change without notice. For the time being, the API is being written so that thye are as close as we can get to DOM Layer 3, but some methods will, for the time being, be punted and aliases for simpler methods that don't necessarily check for the DOM's correctness will be used. Also, the return values are still shaky -- I'm still debating how to handle error cases gracefully.
Package libxml2 is an interface to libxml2 library, providing XML and HTML parsers with DOM interface. The inspiration is Perl5's XML::LibXML module. This library is still in very early stages of development. API may still change without notice. For the time being, the API is being written so that thye are as close as we can get to DOM Layer 3, but some methods will, for the time being, be punted and aliases for simpler methods that don't necessarily check for the DOM's correctness will be used. Also, the return values are still shaky -- I'm still debating how to handle error cases gracefully.
The parser for [the xml that exported by Evernote (.enex file)](https://evernote.com/blog/how-evernotes-xml-export-format-works/).
Package sparql provides a series of parsers for turning SPARQL JSON (mime type: application/sparql-results+json only- this package doesn't touch xml) into useful go data types. Within this package there are two subpackages: 1. github.com/anglo-korean/sparql/bank - a sparql 'query bank' (though realistically I guess this may work for other well-formed data) with `text/template` support 2. github.com/anglo-korean/sparql/repo - a sparql respository client, with various helpers such as auth, and caching This package is simple to use, stable, and relatively quick. It accepts some json, in `string`, `[]byte`, or `io.Reader` form, and returns some rdf terms: Or, to query data using the provided client: Note that the client provided in repo parses returned json autiomatically. (Further documentation for both the repo client and the query bank may be found in those specific packages) Parsed results are parsed into a sparql.Results type, which contains two functions used for accessing data: 1. `res.Bindings()` -> `map[string][]rdf.Term` 2. `res.Solutions()` -> `[]map[string]rdf.Term` An example of working with this data may be found in the examples directory
Package libxml2 is an interface to libxml2 library, providing XML and HTML parsers with DOM interface. The inspiration is Perl5's XML::LibXML module. This library is still in very early stages of development. API may still change without notice. For the time being, the API is being written so that thye are as close as we can get to DOM Layer 3, but some methods will, for the time being, be punted and aliases for simpler methods that don't necessarily check for the DOM's correctness will be used. Also, the return values are still shaky -- I'm still debating how to handle error cases gracefully.
Package libxml2 is an interface to libxml2 library, providing XML and HTML parsers with DOM interface. The inspiration is Perl5's XML::LibXML module. This library is still in very early stages of development. API may still change without notice. For the time being, the API is being written so that thye are as close as we can get to DOM Layer 3, but some methods will, for the time being, be punted and aliases for simpler methods that don't necessarily check for the DOM's correctness will be used. Also, the return values are still shaky -- I'm still debating how to handle error cases gracefully.
Package libxml2 is an interface to libxml2 library, providing XML and HTML parsers with DOM interface. The inspiration is Perl5's XML::LibXML module. This library is still in very early stages of development. API may still change without notice. For the time being, the API is being written so that thye are as close as we can get to DOM Layer 3, but some methods will, for the time being, be punted and aliases for simpler methods that don't necessarily check for the DOM's correctness will be used. Also, the return values are still shaky -- I'm still debating how to handle error cases gracefully.
Package libxml2 is an interface to libxml2 library, providing XML and HTML parsers with DOM interface. The inspiration is Perl5's XML::LibXML module. This library is still in very early stages of development. API may still change without notice. For the time being, the API is being written so that thye are as close as we can get to DOM Layer 3, but some methods will, for the time being, be punted and aliases for simpler methods that don't necessarily check for the DOM's correctness will be used. Also, the return values are still shaky -- I'm still debating how to handle error cases gracefully.
Package libxml2 is an interface to libxml2 library, providing XML and HTML parsers with DOM interface. The inspiration is Perl5's XML::LibXML module. This library is still in very early stages of development. API may still change without notice. For the time being, the API is being written so that thye are as close as we can get to DOM Layer 3, but some methods will, for the time being, be punted and aliases for simpler methods that don't necessarily check for the DOM's correctness will be used. Also, the return values are still shaky -- I'm still debating how to handle error cases gracefully.
Package libxml2 is an interface to libxml2 library, providing XML and HTML parsers with DOM interface. The inspiration is Perl5's XML::LibXML module. This library is still in very early stages of development. API may still change without notice. For the time being, the API is being written so that thye are as close as we can get to DOM Layer 3, but some methods will, for the time being, be punted and aliases for simpler methods that don't necessarily check for the DOM's correctness will be used. Also, the return values are still shaky -- I'm still debating how to handle error cases gracefully.
Package xml implements a simple XML 1.0 parser that understands XML name spaces.
Package cnfg provides procedures to parse parse a slew of environment variables into a struct pointer. Use this package if your app uses a config file and you want to allow users to change or override the configurations in that file with environment variables. You can also use this app just to parse environment variables; handling a config file is entirely optional. Every member type is supported. If I missed one, please open an issue. If you need a non-base type supported (net.IP works already) please open an issue. New types are extremely easy to add. If this package interests you, pull requests and feature requests are welcomed! I consider this package the pinnacle example of how to configure Go applications from a file. You can put your configuration into any file format: XML, YAML, JSON, TOML, and you can override any struct member using an environment variable. I created this package because I got tired of writing custom env parser code for every app I make. This simplifies all the heavy lifting and I don't even have to think about it now. I hope you enjoy using this simplification as much as I do!
Package cnfg provides procedures to parse parse a slew of environment variables into a struct pointer. Use this package if your app uses a config file and you want to allow users to change or override the configurations in that file with environment variables. You can also use this app just to parse environment variables; handling a config file is entirely optional. Every member type is supported. If I missed one, please open an issue. If you need a non-base type supported (net.IP works already) please open an issue. New types are extremely easy to add. If this package interests you, pull requests and feature requests are welcomed! I consider this package the pinnacle example of how to configure Go applications from a file. You can put your configuration into any file format: XML, YAML, JSON, TOML, and you can override any struct member using an environment variable. I created this package because I got tired of writing custom env parser code for every app I make. This simplifies all the heavy lifting and I don't even have to think about it now. I hope you enjoy using this simplification as much as I do!
Package xml implements a simple XML 1.0 parser that understands XML namespaces.
Package xml implements a simple XML 1.0 parser that understands XML name spaces.
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
fxml - FreeStyle XML Parser This package provides a simple parser which reads a XML document and output a tree structure, which does not need a pre-defined “struct”, hence the name “FreeStyle”.
Package xml implements a simple XML 1.0 parser that understands XML name spaces.
Package libxml2 is an interface to libxml2 library, providing XML and HTML parsers with DOM interface. The inspiration is Perl5's XML::LibXML module. This library is still in very early stages of development. API may still change without notice. For the time being, the API is being written so that thye are as close as we can get to DOM Layer 3, but some methods will, for the time being, be punted and aliases for simpler methods that don't necessarily check for the DOM's correctness will be used. Also, the return values are still shaky -- I'm still debating how to handle error cases gracefully.
Package xml implements a simple XML 1.0 parser that understands XML name spaces.
Package libexpat is a ccgo/v4 version of liexapat.a, a stream-oriented XML parser library.
Package xml implements a simple XML 1.0 parser that understands XML name spaces.
Package libxml2 is an interface to libxml2 library, providing XML and HTML parsers with DOM interface. The inspiration is Perl5's XML::LibXML module. This library is still in very early stages of development. API may still change without notice. For the time being, the API is being written so that thye are as close as we can get to DOM Layer 3, but some methods will, for the time being, be punted and aliases for simpler methods that don't necessarily check for the DOM's correctness will be used. Also, the return values are still shaky -- I'm still debating how to handle error cases gracefully.
Package xml implements a simple XML 1.0 parser that understands XML name spaces.
This file contains the parser creating changeset object from strings received by a given channel. This file contains the reader, reading an OSM-file (usually .osm or .xml files) and send each changeset as one-line string to a given channel.
Package xml implements a simple XML 1.0 parser that understands XML name spaces.
Package gparse processes markup language tokens, primarily supporting the three formats of LwDITA: XDITA (XML), HDITA (HTML5), MDITA (Markdown-XP). Terminology: Instead of the term "parse tree", this package uses the term "CST" (Concrete Syntax Tree), to contrast & compare to AST (Abstract Syntax Tree). See for example this introduction: https://en.wikipedia.org/wiki/Abstract_syntax_tree This package uses yuin/goldmark https://github.com/yuin/goldmark as its Markdown parser for several reasons but mainly because work on v2 of the BlackFriday https://github.com/russross/blackfriday Markdown parser seems to have mostly stalled. Also because goldmark creates a CST (which goldmark calls an AST) whereas Blackfriday does not yet. Also goldmark is Commonmark-compliant, but note that this does not guarantee compliance with LwDITA MDITA and MDITA-XP. This package makes its own new types from Go stdlib XML structures, so that they get sensible new names and handy methods while retaining an ability to be type-cast back to the Golang stdlib equivalents. Short names (Att for Attribute, Elm for Element, Doc for Document) keep code readable. This code *should* work with XML namespaces, but this is as yet untested. - NewFoo(..) always allocates new memory and returns a pointer. - Echo() echoes an object back in source XML form, but normalized. - String() outputs a human-friendly form useful for development and debugging but tipicly indigestible to an XML parser. When working with XML we can generally distinguish three types of files: - Record-oriented XML data - expressed using XML elements - Natural language XML documents - also expressed using XML elements, and known as "mixed content" - Validation rules - generally expressed as XSD, RNG, or DTD. It is interesting to note that DTDs actually obey the same fundamental XML syntax rules as the other two types (record-oriented, mixed content); the typical DTD file extensions (`.dtd .mod`) are helpful to humans but are not strictly required as a signal to a parser that fully understands the syntax of all three XML file types (and all types of XML entities) That being said, this package can superficially digest many directives (e.g. ELEMENT, ATTLIST, ENTITY) but does not yet (at this level) completely parse them, or act on them (by performing transclusion).
Package libxml2 is an interface to libxml2 library, providing XML and HTML parsers with DOM interface. The inspiration is Perl5's XML::LibXML module. This library is still in very early stages of development. API may still change without notice. For the time being, the API is being written so that thye are as close as we can get to DOM Layer 3, but some methods will, for the time being, be punted and aliases for simpler methods that don't necessarily check for the DOM's correctness will be used. Also, the return values are still shaky -- I'm still debating how to handle error cases gracefully.
Package xml implements a simple XML 1.0 parser that understands XML name spaces.
Package mmmc contains generic Golang XML stuff: names, attributes, tags, elements, trees, files, documents. Files in this directory use Markdown, so use `godoc2md` on 'em. We make our own versions of Golang XML structures so that we can give them sensible new names and we can define our own methods for them. We also use a couple of shortened names (Att *Attribute*, Elm *Element*) to keep code readable. ) ### Method naming - `NewFoo(..)` always allocates memory. - `Echo()` echoes an object back in source XML form, but normailzed. - `EchoCommented()` also outputs XML source form, but possibly with additional annotations added by processing. - `String()“ outputs a form that is useful for development and debugging but cannot be processed by an XML parser. ### About encoding/decoding and XML mixed content When working with XML we can generally distinguish between two types of files: - Files containing record-oriented data - expressed using XML elements - Files containing natural language documents - also expressed using XML elements - Files containing validation rules - generally expressed as XSD, RNG, or DTD. It is interesting to note that DTDs actually obey the same syntax rules as the other two; the typical file extensions (`.dtd .mod`) are helpful to humans but are not required by a parser that fully understands XML syntax. Package gtree defines low-level structures for Generic Golang XML analysis, structures that are built directly atop (or map'd directly to) Golang's own XML structures. We do this for three reasons: - So that we can define our own helper methods in our own golang namespace; - Cos golang's XML package uses lousy naming (`Name Name`, anyone ?); - Cos golang's XML is written for XML data records, not for mixed content. This repo implements a protocol stack that goes: - the input text file (i.e. XML or other markup) - package encoding/xml (golang's XML package) - package gparse (low-level stuff) - package gfile (deep analysis of individual markup files) - package mmmc (processing of heterogeneous markup files) In general, all go files in this protocol stack should be organised as: <br/> - struct definition() - constructors (named `New*`) - printf stuff (Raw(), Echo(), String()) Some characteristic methods: - Raw() returns the original string passed from the golang XML parser - Echo() returns a string of the item in normalised form, altho the presence of terminating newlines is not uniform String() returns a string suitable for runtime nonitoring and debugging NOTE:1280 the use of shorthand in variable names: Doc, Elm, Att. NOTE:1220 that we store non-nil namespaces with a colon appended, for easy output. NOTE:1230 that we use `godoc2md`, so we can use Markdown in these code comments. NOTE:1030 that like other godoc comments, this package comment must be *right* above the target statement (`package`) if it is to be included by `godoc2md`.
Package mcfile defines a per-file structure [MCFile] that holds all relevant per-file information. This includes: For a discussion of tree walk functions, see `doc_wfn.go` Note that if we do not get an explicit XML DOCTYPE declaration, there is some educated guesswork required. The first workflow was based on XML, and comprises: `text => XML tokens => GTokens => GTags => GTree` First, package `gparse` gets as far as the `GToken`s, which can only be in a list: they have no tree structure. Then package `gtree` handles the rest. XML analysis starts off with tokenization (by the stdlib), so it makes sense to then have separate steps for making `GToken's, GTag's, GTree`. <br/> MKDN and HTML analyses use higher-level libraries that deliver CSTs (Concrete Syntax Tree, i.e. parse tree). We choose to do this processing in `package gparse` rather than in `package gtree`. MKDN gets a tree of `yuin/goldmark/ast/Node`, and HTML gets a tree of stdlib `golang.org/x/net/html/Node`. Since a CST is delivered fully-formed, it makes sense to have Step 1 that attaches to each node its `GToken´ and `GTag`, and then Step 2 that builds a `GTree`. There are three major types of `MCFile`, corresponding to how we process the file content: - "XML" - - (§1) Use stdlib `encoding/xml` to get `[]XU.XToken` - - (§1) Convert `[]XU.XToken` to `[]gparse.GToken` - - (§2) Build `GTree` - "MKDN" - - (§1) Use `yuin/goldmark` to get tree of `yuin/goldmark/ast/Node` - - (§1) From each Node make a `MkdnToken` (in a list?) incl. `GToken` and `GTag` - - (§2) Build `GTree` - "HTML" - - (§1) Use `golang.org/x/net/html` to get a tree of `html.Node` - - (§1) From each Node make a `HtmlToken` (in a list?) incl. `GToken` and `GTag` - - (§2) Build `GTree` In general, all go files in this protocol stack should be organised as: <br/> - struct definition() - constructors (named `New*`) - printf stuff (Raw(), Echo(), String()) Some characteristic methods: - Raw() returns the original string passed from the golang XML parser (with whitespace trimmed) - Echo() returns a string of the item in normalised form, altho be aware that the presence of terminating newlines is not treated uniformly - String() returns a string suitable for runtime nonitoring and debugging NOTE The use of shorthand in variable names: Doc, Elm, Att. NOTE We use `godoc2md`, so we can use Markdown in these code comments.
Package xml implements a simple XML 1.0 parser that understands XML name spaces.
XML DOM processing for Golang, supports xpath query
Package xml implements a simple XML 1.0 parser that understands XML name spaces.
Package xml implements a simple XML 1.0 parser that understands XML name spaces.
Package xml implements a simple XML 1.0 parser that understands XML name spaces.
Package libxml2 is an interface to libxml2 library, providing XML and HTML parsers with DOM interface. The inspiration is Perl5's XML::LibXML module. This library is still in very early stages of development. API may still change without notice. For the time being, the API is being written so that thye are as close as we can get to DOM Layer 3, but some methods will, for the time being, be punted and aliases for simpler methods that don't necessarily check for the DOM's correctness will be used. Also, the return values are still shaky -- I'm still debating how to handle error cases gracefully.
Package libxml2 is an interface to libxml2 library, providing XML and HTML parsers with DOM interface. The inspiration is Perl5's XML::LibXML module. This library is still in very early stages of development. API may still change without notice. For the time being, the API is being written so that thye are as close as we can get to DOM Layer 3, but some methods will, for the time being, be punted and aliases for simpler methods that don't necessarily check for the DOM's correctness will be used. Also, the return values are still shaky -- I'm still debating how to handle error cases gracefully.