Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
cb67ea1d
Commit
cb67ea1d
authored
Mar 31, 2001
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initialize Attr.value with empty string in createAttribute*, as per DOM
spec. Closes bug #412036. Also reindent toprettyxml.
parent
68ad64af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
Lib/xml/dom/minidom.py
Lib/xml/dom/minidom.py
+7
-5
No files found.
Lib/xml/dom/minidom.py
View file @
cb67ea1d
...
...
@@ -87,11 +87,11 @@ class Node(_Node):
return
writer
.
getvalue
()
def
toprettyxml
(
self
,
indent
=
"
\
t
"
,
newl
=
"
\
n
"
):
# indent = the indentation string to prepend, per level
# newl = the newline string to append
writer
=
_get_StringIO
()
self
.
writexml
(
writer
,
""
,
indent
,
newl
)
return
writer
.
getvalue
()
# indent = the indentation string to prepend, per level
# newl = the newline string to append
writer
=
_get_StringIO
()
self
.
writexml
(
writer
,
""
,
indent
,
newl
)
return
writer
.
getvalue
()
def
hasChildNodes
(
self
):
if
self
.
childNodes
:
...
...
@@ -794,6 +794,7 @@ class Document(Node):
def
createAttribute
(
self
,
qName
):
a
=
Attr
(
qName
)
a
.
ownerDocument
=
self
a
.
value
=
""
return
a
def
createElementNS
(
self
,
namespaceURI
,
qualifiedName
):
...
...
@@ -806,6 +807,7 @@ class Document(Node):
prefix
,
localName
=
_nssplit
(
qualifiedName
)
a
=
Attr
(
qualifiedName
,
namespaceURI
,
localName
,
prefix
)
a
.
ownerDocument
=
self
a
.
value
=
""
return
a
def
getElementsByTagNameNS
(
self
,
namespaceURI
,
localName
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment