mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 18:49:16 +02:00
* added new function to xmlxsd library
git-svn-id: trunk@12804 -
This commit is contained in:
parent
eb40758e9c
commit
58bbbf1656
@ -172,6 +172,7 @@ const
|
|||||||
function xsdTestNode(node: xmlNodePtr; name, nameSpace: xmlCharPtr): Boolean;
|
function xsdTestNode(node: xmlNodePtr; name, nameSpace: xmlCharPtr): Boolean;
|
||||||
|
|
||||||
function xsdTryGetChild(node: xmlNodePtr; name, nameSpace: xmlCharPtr; Index: Integer = 0): xmlNodePtr;
|
function xsdTryGetChild(node: xmlNodePtr; name, nameSpace: xmlCharPtr; Index: Integer = 0): xmlNodePtr;
|
||||||
|
function xsdTryGetChild(node: xmlNodePtr; name, nameSpace: xmlCharPtr; var child: xmlNodePtr; Index: Integer = 0): Boolean;
|
||||||
function xsdTryGetChildChars(node: xmlNodePtr; name, nameSpace: xmlCharPtr; Index: Integer = 0): xmlCharPtr;
|
function xsdTryGetChildChars(node: xmlNodePtr; name, nameSpace: xmlCharPtr; Index: Integer = 0): xmlCharPtr;
|
||||||
function xsdTryGetChildString(node: xmlNodePtr; name, nameSpace: xmlCharPtr; var Value: String; Index: Integer = 0): Boolean;
|
function xsdTryGetChildString(node: xmlNodePtr; name, nameSpace: xmlCharPtr; var Value: String; Index: Integer = 0): Boolean;
|
||||||
function xsdTryGetChildBoolean(node: xmlNodePtr; name, nameSpace: xmlCharPtr; var Value: Boolean; Index: Integer = 0): Boolean;
|
function xsdTryGetChildBoolean(node: xmlNodePtr; name, nameSpace: xmlCharPtr; var Value: Boolean; Index: Integer = 0): Boolean;
|
||||||
@ -1373,6 +1374,12 @@ begin
|
|||||||
Result := nil;
|
Result := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function xsdTryGetChild(node: xmlNodePtr; name, nameSpace: xmlCharPtr; var child: xmlNodePtr; Index: Integer): Boolean;
|
||||||
|
begin
|
||||||
|
child := xsdTryGetChild(node, name, nameSpace, Index);
|
||||||
|
Result := Assigned(child);
|
||||||
|
end;
|
||||||
|
|
||||||
function xsdTryGetChildChars(node: xmlNodePtr; name, nameSpace: xmlCharPtr; Index: Integer): xmlCharPtr;
|
function xsdTryGetChildChars(node: xmlNodePtr; name, nameSpace: xmlCharPtr; Index: Integer): xmlCharPtr;
|
||||||
begin
|
begin
|
||||||
Result := xmlNodeGetContent(xsdTryGetChild(node, name, nameSpace, Index));
|
Result := xmlNodeGetContent(xsdTryGetChild(node, name, nameSpace, Index));
|
||||||
@ -1595,16 +1602,8 @@ end;
|
|||||||
|
|
||||||
function xsdTryNext(var node: xmlNodePtr; name, nameSpace: xmlCharPtr; var last: xmlNodePtr): Boolean;
|
function xsdTryNext(var node: xmlNodePtr; name, nameSpace: xmlCharPtr; var last: xmlNodePtr): Boolean;
|
||||||
begin
|
begin
|
||||||
while Assigned(node) and (node^._type = XML_TEXT_NODE) do
|
last := xsdTryNext(node, name, nameSpace);
|
||||||
node := node^.next;
|
Result := Assigned(last);
|
||||||
|
|
||||||
if xsdTestNode(node, name, nameSpace) then
|
|
||||||
begin
|
|
||||||
last := node;
|
|
||||||
node := node^.next;
|
|
||||||
Result := True;
|
|
||||||
end else
|
|
||||||
Result := False;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function xsdTryNextChars(var node: xmlNodePtr; name, nameSpace: xmlCharPtr): xmlCharPtr;
|
function xsdTryNextChars(var node: xmlNodePtr; name, nameSpace: xmlCharPtr): xmlCharPtr;
|
||||||
|
Loading…
Reference in New Issue
Block a user