-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keep track of the current xml:base value
Tracks xml:base attributes in a stack of *url.URLs. Consumers of the parser can access the top-level URL through `XMLPullParser.BaseStack.Top()` This is useful for applications that need to resolve URLs in XML documents relative to the xml:base attributes. To that end, a helper method is provided which will resolve a relative string to an absolute URL according to the current base: `func (p *XMLPullParser) XmlBaseResolveUrl(u string) (*url.URL, error)` Includes a single test. It is not comprehensive, but it checks for xml:base to two levels, tests resolving a string against the current base, as well as resolution of relative xml:base values.
- Loading branch information
Showing
2 changed files
with
118 additions
and
1 deletion.
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