OpenersPrimaryExamplesSection(Spacer1)Examples  (8)

OpenersExampleSection0(Spacer1)Basic Examples  (7)

Import a graph from a GraphML file:

Import["ExampleData/directed.graphml"]

Export a (RefLink[Graph, paclet:ref/Graph]) object to GraphML:

Export[ "harary.graphml",HararyGraph[4,8]]

Export graph data to GraphML:

Export[ "cubical.graphml","EdgeRules"-> GraphData["CubicalGraph", "EdgeRules"],"Rules" ]

Import a graph from the exported file:

Import["cubical.graphml"]

Show the (RefLink[Import, paclet:ref/Import]) elements available in an example file:

Import["ExampleData/attributes.graphml", "Elements"]

Import edge and vertex labels and the connectivity rules from this file:

Import["ExampleData/attributes.graphml", {{"EdgeLabels", "VertexList","EdgeRules"}} ]

Import as a (RefLink[Graph, paclet:ref/Graph]) object:

Import["ExampleData/attributes.graphml", "Graph", VertexLabels-> "Name",ImagePadding ->10]

Import the edge attributes in an example file:

Import["ExampleData/attributes.graphml", "EdgeAttributes"]

OpenersExampleSection1(Spacer1)Scope  (1)

Import and plot a graph, displaying vertex labels:

Import["ExampleData/simple.graphml" ,"Graphics", VertexLabels-> Automatic]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {Related Formats:  (RefLink[Graph6, paclet:ref/format/Graph6])  ▪  (RefLink[GXL, paclet:ref/format/GXL])  ▪  (RefLink[DOT, paclet:ref/format/DOT])  ▪  (RefLink[GraphML, paclet:ref/format/GraphML])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Importing & Exporting, paclet:guide/ImportingAndExporting])}, {▪(RefLinkPlain[Listing of All Formats, paclet:guide/ListingOfAllFormats])}, {▪(RefLinkPlain[Mathematical Data, paclet:guide/MathematicalData])}, {▪(RefLinkPlain[Mathematical Data Formats, paclet:guide/MathematicalDataFormats])}})}})