-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shameless green to parse MARC XML files (in addition to MARC binary f…
…iles)
- Loading branch information
1 parent
af15f53
commit 5cfc967
Showing
2 changed files
with
92 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package marc | ||
|
||
type XmlRecord struct { | ||
Leader string `xml:"leader"` | ||
ControlFields []struct { | ||
Value string `xml:",chardata"` | ||
Tag string `xml:"tag,attr"` | ||
} `xml:"controlfield"` | ||
DataFields []struct { | ||
Tag string `xml:"tag,attr"` | ||
Ind1 string `xml:"ind1,attr"` | ||
Ind2 string `xml:"ind2,attr"` | ||
SubFields []struct { | ||
Value string `xml:",chardata"` | ||
Code string `xml:"code,attr"` | ||
} `xml:"subfield"` | ||
} `xml:"datafield"` | ||
} |