Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Server Developers
Viewing all articles
Browse latest Browse all 20709

How to create a xml element for Text with Java?

$
0
0

Hi @ all,

 

I want to tag a part of a text with Java.

Like the InDesign function "Tag für Text" (maybe "tag for text" in english)

 

tagged text.png

Is there a way to tag text with Java?

I tried to autoTag and to markup the text with an existing xml, but only got IdsExceptions.

 

here the code where to tag the text:

 

XMLElement newXML = parentXML.addXMLElement(VariableTypeUtils.createString("newXML"),OptArg.noVariableType());

Text[] texts = para.findText(OptArg.noBoolean());

for (Text text : texts)

{

   //TODO tag text

}

 

Exception throwing code:

 

text.autoTag();

text.markup(newXML);

newXML.markup(VariableTypeUtils.createObject(text));


Viewing all articles
Browse latest Browse all 20709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>