Merge pull request #5160 from mpcjanssen/xmldom-mpcjanssen
Define getAttributes(NS) on PNode instead of PElement.
This commit is contained in:
commit
46e4b4854e
1 changed files with 2 additions and 2 deletions
|
|
@ -890,7 +890,7 @@ proc tagName*(el: PElement): string =
|
||||||
return el.fTagName
|
return el.fTagName
|
||||||
|
|
||||||
# Procedures
|
# Procedures
|
||||||
proc getAttribute*(el: PElement, name: string): string =
|
proc getAttribute*(el: PNode, name: string): string =
|
||||||
## Retrieves an attribute value by ``name``
|
## Retrieves an attribute value by ``name``
|
||||||
if isNil(el.attributes):
|
if isNil(el.attributes):
|
||||||
return nil
|
return nil
|
||||||
|
|
@ -900,7 +900,7 @@ proc getAttribute*(el: PElement, name: string): string =
|
||||||
else:
|
else:
|
||||||
return nil
|
return nil
|
||||||
|
|
||||||
proc getAttributeNS*(el: PElement, namespaceURI: string, localName: string): string =
|
proc getAttributeNS*(el: PNode, namespaceURI: string, localName: string): string =
|
||||||
## Retrieves an attribute value by ``localName`` and ``namespaceURI``
|
## Retrieves an attribute value by ``localName`` and ``namespaceURI``
|
||||||
if isNil(el.attributes):
|
if isNil(el.attributes):
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue