xpath 0.1.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 65

A library for Dart developers.

Created from templates made available by Stagehand under a BSD-style license.

Usage

A simple usage example:

import 'package:xpath/xpath.dart';

String html = '''
<html>
 <body id="content">
   <h1>hello</h1>
 </body>
</html>
'''

main() {
  var tree = Etree.fromString(html);
  print(tree.xpath('//*[@id="content"]/h1/text()'[0].name); // print hello
}

Features and bugs

Please file feature requests and bugs at the issue tracker.

1.0.0

  • Initial version, created by Stagehand

example/xpath_example.dart

import 'package:xpath/xpath.dart';

main() {
 // var awesome = new Awesome();
 // print('awesome: ${awesome.isAwesome}');
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  xpath: ^0.1.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:xpath/xpath.dart';
  
Version Uploaded Documentation Archive
0.1.0 Sep 21, 2018 Go to the documentation of xpath 0.1.0 Download xpath 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
41
Health:
Code health derived from static analysis. [more]
96
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
65
Learn more about scoring.

We analyzed this package on Oct 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.4

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:xpath/xpath.dart.

Health suggestions

Fix lib/src/xpath_base.dart. (-4.41 points)

Analysis of lib/src/xpath_base.dart reported 9 hints, including:

line 48 col 7: The value of the field '_depth' isn't used.

line 239 col 23: The type of the function literal can't be inferred because the literal has a block as its body.

line 244 col 29: The type of the function literal can't be inferred because the literal has a block as its body.

line 252 col 37: The type of the function literal can't be inferred because the literal has a block as its body.

line 269 col 9: The type of the function literal can't be inferred because the literal has a block as its body.

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
Dev dependencies
test ^1.0.0