mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 18:09:30 +02:00
* added CDATA xsd helper function: xsdNewChildCData
git-svn-id: trunk@16872 -
This commit is contained in:
parent
aad696166d
commit
3d8df4fd92
@ -34,6 +34,7 @@ type
|
||||
|
||||
{ Node creation functions }
|
||||
function xsdNewChildBase64(parent: xmlNodePtr; ns: xmlNsPtr; name: xmlCharPtr; Value: TStream): xmlNodePtr;
|
||||
function xsdNewChildCData(parent: xmlNodePtr; ns: xmlNsPtr; name: xmlCharPtr; Value: Utf8String): xmlNodePtr;
|
||||
function xsdNewChildString(parent: xmlNodePtr; ns: xmlNsPtr; name: xmlCharPtr; Value: Utf8String): xmlNodePtr;
|
||||
function xsdNewChildBoolean(parent: xmlNodePtr; ns: xmlNsPtr; name: xmlCharPtr; Value: Boolean; UseWords: Boolean = False): xmlNodePtr;
|
||||
function xsdNewChildDate(parent: xmlNodePtr; ns: xmlNsPtr; name: xmlCharPtr; Year, Month, Day: Longword; BC: Boolean = False; Timezone: PXsdTimezone = nil): xmlNodePtr;
|
||||
@ -257,6 +258,13 @@ begin
|
||||
Result := xmlNewChild(parent, ns, name, PChar(Tmp));
|
||||
end;
|
||||
|
||||
function xsdNewChildCData(parent: xmlNodePtr; ns: xmlNsPtr; name: xmlCharPtr; Value: Utf8String): xmlNodePtr;
|
||||
begin
|
||||
Result := xmlNewNode(ns, name);
|
||||
xmlAddChild(Result, xmlNewCDataBlock(parent^.doc, PChar(Value), Length(Value)));
|
||||
xmlAddChild(parent, Result);
|
||||
end;
|
||||
|
||||
function xsdNewChildString(parent: xmlNodePtr; ns: xmlNsPtr; name: xmlCharPtr; Value: Utf8String): xmlNodePtr;
|
||||
begin
|
||||
Result := xmlNewChild(parent, ns, name, PChar(Value));
|
||||
|
Loading…
Reference in New Issue
Block a user