Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/jsoupPublic

Commit7fb6d02

Browse files
committed
Keep the W3CBuilder static
Ensures API backcompat
1 parent2b573de commit7fb6d02

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/main/java/org/jsoup/helper/W3CDom.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ public void convert(org.jsoup.nodes.Document in, Document out) {
240240
*/
241241
publicvoidconvert(org.jsoup.nodes.Elementin,Documentout) {
242242
W3CBuilderbuilder =newW3CBuilder(out);
243+
builder.namespaceAware =namespaceAware;
243244
org.jsoup.nodes.DocumentinDoc =in.ownerDocument();
244245
if (inDoc !=null) {
245246
if (!StringUtil.isBlank(inDoc.location())) {
@@ -333,11 +334,12 @@ public String asString(Document doc) {
333334
/**
334335
* Implements the conversion by walking the input.
335336
*/
336-
protectedclassW3CBuilderimplementsNodeVisitor {
337+
protectedstaticclassW3CBuilderimplementsNodeVisitor {
337338
privatestaticfinalStringxmlnsKey ="xmlns";
338339
privatestaticfinalStringxmlnsPrefix ="xmlns:";
339340

340341
privatefinalDocumentdoc;
342+
privatebooleannamespaceAware =true;
341343
privatefinalStack<HashMap<String,String>>namespacesStack =newStack<>();// stack of namespaces, prefix => urn
342344
privateNodedest;
343345
privateSyntaxsyntax =Syntax.xml;// the syntax (to coerce attributes to). From the input doc if available.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp