Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How do I parse an XML file in illustrator plugin?

Participant ,
Mar 22, 2013 Mar 22, 2013

My current task is this: Open xml file from file system (later this will be from a remote service), parse the xml, display content from xml to user. There are further steps after this, but I am stuck at the first step itself. What illustrator plugin sdk APIs allow me to parse xml and create a dom out of it? Thanks in advance.

Version: Illustrator CS 5.1

TOPICS
SDK
2.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Mar 25, 2013 Mar 25, 2013

The are no XML parsing APIs in the Illustrator SDK. They have an XML-ish suite, but that's for managing a document's metadata, which -- at least through the API -- looks & feels like XML.

If you want to parse & read an XML file, there are lots of other libraries you can use to do so. We use Xerces, which is one of the most widely used XML libraries.

Translate
Adobe
Guide ,
Mar 25, 2013 Mar 25, 2013

The are no XML parsing APIs in the Illustrator SDK. They have an XML-ish suite, but that's for managing a document's metadata, which -- at least through the API -- looks & feels like XML.

If you want to parse & read an XML file, there are lots of other libraries you can use to do so. We use Xerces, which is one of the most widely used XML libraries.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 25, 2013 Mar 25, 2013

Thanks. I was just hoping that I could use one of the suites to parse xml. Looks like i have to start evaluating the libraries now.    

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 27, 2013 Mar 27, 2013

You will have to link against third party lib like Xerces for doing that.

I have already completed that successfully. (Mac OS X and Win).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 19, 2017 Jan 19, 2017

I include  xercesc to my plugin, and build ok, but occur error when run at line:

std::auto_ptr<xercesc::XercesDOMParser>parser( new xercesc::XercesDOMParser() ) ;

Error: Unhandled exception at 0x0f1bb7c0 (InitTestAI.aip) in Illustrator.exe: 0xC0000005: Access violation reading location 0x00000000.

How can fix this error? thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 19, 2017 Jan 19, 2017

Did you do the proper initialization steps as laid out in the docs?

Programming Guide

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 19, 2017 Jan 19, 2017
LATEST

thank you.

i miss Initialize.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines