#include <SnpXMLHelper.h>
|
| | SnpXMLHelper () |
| |
| virtual | ~SnpXMLHelper () |
| |
| UIDRef | AcquireTag (const UIDRef &documentUIDRef, const PMString &tagName) |
| |
| ErrorCode | AssociateDTD (const UIDRef &documentUIDRef, const IDFile &dtdFile) |
| |
| PMString | AsString (const UIDRef &tagUIDRef) |
| |
| PMString | AsString (const XMLReference &xmlReference) |
| |
| ErrorCode | ChangeTagName (const UIDRef &tagUIDRef, const PMString &newTagName) |
| |
| PMString | GetClassFrom (const ClassID &classID) |
| |
| PMString | GetClassFrom (const UIDRef &objUIDRef) |
| |
| XMLReference | GetRootXMLReference (const UIDRef &documentUIDRef) |
| |
| TextIndex | InsertTaggedText (const UIDRef &textModelUIDRef, const PMString &pstr, TextIndex startIndex, const PMString &tagName) |
| |
| ErrorCode | PlaceElement (const XMLReference &xmlRef, const UIDRef &graphicFrameUIDRef) |
| |
| ErrorCode | SetExportFromSelected (const UIDRef &workspaceUIDRef, bool16 state) |
| |
| ErrorCode | SetImportIntoSelected (const UIDRef &workspaceUIDRef, bool16 state) |
| |
| ErrorCode | SetRootTag (const UIDRef &documentUIDRef, const PMString &tagName) |
| |
| ErrorCode | ShowHideTaggedFrames (bool16 setVisible) |
| |
| ErrorCode | TagStory (const UIDRef &textModelUIDRef, const PMString &tagName) |
| |
| ErrorCode | TagTable (const UIDRef &tableModelUIDRef, const PMString &tableTagName, const PMString &cellTagName, XMLReference &outCreatedXMLReference) |
| |
| ErrorCode | TagTextRange (const UIDRef &textModelUIDRef, const PMString &tagName, TextIndex startIndex, TextIndex endIndex) |
| |
Provides XML-related methods, some of which are wrappers around methods on facades (IXMLElementCommands, IXMLTagCommands, IXMLUtils).
- See Also
- IXMLElementCommands, IXMLTagCommands, IXMLUtils
| SnpXMLHelper::SnpXMLHelper | ( | | ) | |
| inline |
| virtual SnpXMLHelper::~SnpXMLHelper | ( | | ) | |
| inlinevirtual |
Obtain a reference to a tag (kXMLTagBoss) by name. If the tag exists in the tag-list of the specified document with the given name, a reference to the existing tag is returned. If the tag doesn't exist then it is created.
- Precondition
- documentUIDRef should allow IDocument to be instantiated
- Parameters
| documentUIDRef | identifies document in which the tag is to be created/acquired |
| tagName | specifies tag of interest. |
- Returns
- UIDRef of kXMLTagBoss, from which IXMLTag can be instantiated
| ErrorCode SnpXMLHelper::AssociateDTD | ( | const UIDRef & | documentUIDRef, |
| | const IDFile & | dtdFile |
| ) | | |
Associate (import) a DTD with the logical structure of a document
- Precondition
- documentUIDRef should allow IDocument to be instantiated
- Parameters
| documentUIDRef | specifies document of interest |
| dtdFile | specifies the DTD file to associate with the document |
- Returns
- ErrorCode kSuccess on success, some other ErrorCode otherwise
Return a description of the tag object (kXMLTagBoss) supplied
- Precondition
- tagUIDRef should allow IXMLTag to be instantiated
- Parameters
| tagUIDRef | specifies tag object (kXMLTagBoss) of interest |
- Returns
- PMString containing description of the tag
Return a description of the XML element (IIDXMLElement) supplied.
- Parameters
| xmlReference | specifies XML element of interest |
- Returns
- PMString containing description of the XML element
| ErrorCode SnpXMLHelper::ChangeTagName | ( | const UIDRef & | tagUIDRef, |
| | const PMString & | newTagName |
| ) | | |
Mutator for the name of a tag
- Precondition
- tagUIDRef should allow IXMLTag to be instantiated
- Parameters
| tagUIDRef | specifies the tag (kXMLTagBoss) of interest |
| newTagName | |
- Returns
- ErrorCode
Return the class of an object as a PMString, in debug or release.
- Parameters
- Returns
- PMString containing the name of the class
Return the class of an object as a PMString, in debug or release.
- Parameters
| objUIDRef | specifies object of interest |
- Returns
- PMString containing the name fo the class
| TextIndex SnpXMLHelper::InsertTaggedText | ( | const UIDRef & | textModelUIDRef, |
| | const PMString & | pstr, |
| | TextIndex | startIndex, |
| | const PMString & | tagName |
| ) | | |
Inserts a tagged text range into a story.
- Precondition
- textModelUIDRef should allow ITextModel to be instantiated
- Parameters
| textModelUIDRef | specifies the story (kTextStoryBoss) of interest |
| pstr | contains the text to tag |
| startIndex | where the text is to be inserted into the story |
| tagName | specifies the tag by name |
- Returns
- TextIndex indicating new insertion point just after the text inserted
| ErrorCode SnpXMLHelper::InsertText | ( | const UIDRef & | textModelUIDRef, | | | const PMString & | data, | | | const TextIndex & | position | | ) | | |
| protected |
Helper method that is used by InsertTaggedText.
- Parameters
| textModelUIDRef | |
| data | |
| position | |
- Returns
- ErrorCode
| ErrorCode SnpXMLHelper::PlaceElement | ( | const XMLReference & | xmlRef, |
| | const UIDRef & | graphicFrameUIDRef |
| ) | | |
Places element (IIDXMLElement) into graphic frame.
- Precondition
- graphicFrameUIDRef should allow IGraphicFrameData to be instantiated
- object specified by graphicFrameUIDRef should support IXMLUtils::IsTaggablePageItem
- Parameters
| xmlRef | specifies element of interest |
| graphicFrameUIDRef | graphic frame into which content should be placed |
- Returns
- ErrorCode
| ErrorCode SnpXMLHelper::SetExportFromSelected | ( | const UIDRef & | workspaceUIDRef, |
| | bool16 | state |
| ) | | |
Set the preference to export from selected element, used by export provider.
- Precondition
- workspaceUIDRef should allow IWorkspace to be instantiated
- Parameters
- Returns
- ErrorCode
| ErrorCode SnpXMLHelper::SetImportIntoSelected | ( | const UIDRef & | workspaceUIDRef, |
| | bool16 | state |
| ) | | |
Set preference for import provider to import into selected node
- Precondition
- workspaceUIDRef should allow IWorkspace to be instantiated
- Parameters
- Returns
- ErrorCode
| ErrorCode SnpXMLHelper::SetRootTag | ( | const UIDRef & | documentUIDRef, |
| | const PMString & | tagName |
| ) | | |
Set name of the root element's tag
- Precondition
- documentUIDRef should allow IDocument to be instantiated
- Parameters
- Returns
- ErrorCode
| ErrorCode SnpXMLHelper::ShowHideTaggedFrames | ( | bool16 | setVisible | ) | |
Control visibility of tagged frame decoration.
- Parameters
- Returns
- ErrorCode
| ErrorCode SnpXMLHelper::TagStory | ( | const UIDRef & | textModelUIDRef, |
| | const PMString & | tagName |
| ) | | |
Tag a table (kTableModelBoss).
- Precondition
- tableModelUIDRef should allow instantiating ITableModel
- Parameters
| tableModelUIDRef | |
| tableTagName | |
| cellTagName | |
- Returns
- ErrorCode
| ErrorCode SnpXMLHelper::TagTextRange | ( | const UIDRef & | textModelUIDRef, |
| | const PMString & | tagName, |
| | TextIndex | startIndex, |
| | TextIndex | endIndex |
| ) | | |
Create a tagged text range.
- Precondition
- textModelUIDRef should allow instantiating ITextModel
- startIndex, endIndex should lie in same story thread (ITextStoryThread)
- Parameters
| textModelUIDRef | |
| tagName | |
| startIndex | |
| endIndex | |
- Returns
- ErrorCode