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. This is mostly a drop-in replacement for 'encoding/xml' with minor changes:
Package xml implements a simple XML 1.0 parser that understands XML name spaces.
GangGo Federation Library Copyright (C) 2017-2018 Lukas Matt <lukas@zauberstuhl.de> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. To send a entity to a fediverse server we simply have to construct one with the protocol we want to use and hit send! :) To receive and parser diaspora requests `federation.DiasporaParse` and `federation.DiasporaParseEncrypted` is used. Diaspora has to main routes to receive entities: 1) /receive/public 2) /receive/private/:guid If we receive something via 1) it will be in a xml format and can be parsed without encryption in the first place. If we receive a entity via 2) we have to decrypt the xml first. This is better described here: https://diaspora.github.io/diaspora_federation/federation/encryption.html [...] After we succesfully parsed the request we will end up with a `Message` interface which includes the `MessageBase` and can be type casted to every entity message. Afterwards all information can be retrieved via abstraction methods e.g. entity.Author()
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 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 discogs introduces a way to categorize XML data dumps from Discogs: https://data.discogs.com. The intention of using this parser is a library, which means there is not an executable part provided. The project has no other dependencies than the Golang language itself. There are three existing writers supported by default: JSON, SQL and DB. JSON Writer - As the name prompts this writer transforms input XML into JSON format. This writer could be used as a solution that converts data into any NoSQL database. SQL Writer - The second supported writer creates SQL file with all necessary data from input. This file can be executed in any SQL database and the result will be populated table with the proper information. DB Writer - The last writer is for direct communication with the SQL database. All input data will be saved into appropriate tables immediately. Before using this writer all required data tables need to be created. For that purpose please run the SQL script named tables.sql in the sql_scripts folder.. You can also set up indexes on any column you want, to facilitate this process there is also the script called indexes.sql situated in the sql_script folder. To speed up a data transformation I would rather recommend creating indexes after the whole processing is completed. Example of basic usage: Example with SQL writer
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.
Copyright 2023 The libexpat-go Authors. All rights reserved. Use of the source code is governed by a BSD-style license that can be found in the LICENSE file. 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 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 xml implements a simple XML 1.0 parser that understands XML name spaces.