forked from ukamnya/microdata_mirror
Format examples and lint markdown
parent
ccf4160317
commit
7b1ac7f510
|
@ -1,4 +1,5 @@
|
|||
# microdata
|
||||
|
||||
A microdata parser in Go
|
||||
|
||||
See [http://www.w3.org/TR/microdata/](http://www.w3.org/TR/microdata/) for more information about Microdata
|
||||
|
@ -13,11 +14,11 @@ Simply run
|
|||
|
||||
Documentation is at [http://godoc.org/github.com/iand/microdata](http://godoc.org/github.com/iand/microdata)
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
Example of parsing a string containing HTML:
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
|
@ -41,9 +42,11 @@ Example of parsing a string containing HTML:
|
|||
|
||||
println("Name: ", data.Items[0].Properties["name"][0].(string))
|
||||
}
|
||||
```
|
||||
|
||||
Extract microdata from a webpage and print the result as JSON
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
|
@ -72,16 +75,14 @@ Extract microdata from a webpage and print the result as JSON
|
|||
json, _ := data.JSON()
|
||||
os.Stdout.Write(json)
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## Authors
|
||||
|
||||
* [Ian Davis](http://github.com/iand) - <http://iandavis.com/>
|
||||
|
||||
|
||||
## Contributors
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
* Do submit your changes as a pull request
|
||||
|
|
Loading…
Reference in New Issue